Changeset 225694 in webkit


Ignore:
Timestamp:
Dec 8, 2017 12:32:20 PM (6 years ago)
Author:
achristensen@apple.com
Message:

Modernize APIWebsiteDataStore.h and WebProcessPool.h
https://bugs.webkit.org/show_bug.cgi?id=180588

Reviewed by Chris Dumez.

pragma once, Ref instead of RefPtr, initializer list in header instead of literals in constructor.

  • UIProcess/API/APIWebsiteDataStore.h:
  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::WebProcessPool):

  • UIProcess/WebProcessPool.h:
Location:
trunk/Source/WebKit
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r225692 r225694  
     12017-12-08  Alex Christensen  <achristensen@webkit.org>
     2
     3        Modernize APIWebsiteDataStore.h and WebProcessPool.h
     4        https://bugs.webkit.org/show_bug.cgi?id=180588
     5
     6        Reviewed by Chris Dumez.
     7
     8        pragma once, Ref instead of RefPtr, initializer list in header instead of literals in constructor.
     9
     10        * UIProcess/API/APIWebsiteDataStore.h:
     11        * UIProcess/WebProcessPool.cpp:
     12        (WebKit::WebProcessPool::WebProcessPool):
     13        * UIProcess/WebProcessPool.h:
     14
    1152017-12-08  Yusuke Suzuki  <utatane.tea@gmail.com>
    216
  • trunk/Source/WebKit/UIProcess/API/APIWebsiteDataStore.h

    r225490 r225694  
    2424 */
    2525
    26 #ifndef APIWebsiteDataStore_h
    27 #define APIWebsiteDataStore_h
     26#pragma once
    2827
    2928#include "APIHTTPCookieStore.h"
     
    5049    void setResourceLoadStatisticsEnabled(bool);
    5150
    52     WebKit::WebsiteDataStore& websiteDataStore() { return *m_websiteDataStore; }
     51    WebKit::WebsiteDataStore& websiteDataStore() { return m_websiteDataStore.get(); }
    5352    HTTPCookieStore& httpCookieStore();
    5453
     
    7877    static String websiteDataDirectoryFileSystemRepresentation(const String& directoryName);
    7978
    80     RefPtr<WebKit::WebsiteDataStore> m_websiteDataStore;
     79    Ref<WebKit::WebsiteDataStore> m_websiteDataStore;
    8180    RefPtr<HTTPCookieStore> m_apiHTTPCookieStore;
    8281};
    8382
    8483}
    85 
    86 #endif // APIWebsiteDataStore_h
  • trunk/Source/WebKit/UIProcess/WebProcessPool.cpp

    r225622 r225694  
    217217WebProcessPool::WebProcessPool(API::ProcessPoolConfiguration& configuration)
    218218    : m_configuration(configuration.copy())
    219     , m_haveInitialEmptyProcess(false)
    220     , m_processWithPageCache(0)
    221219    , m_defaultPageGroup(WebPageGroup::createNonNull())
    222220    , m_injectedBundleClient(std::make_unique<API::InjectedBundleClient>())
     
    226224    , m_customProtocolManagerClient(std::make_unique<API::CustomProtocolManagerClient>())
    227225    , m_visitedLinkStore(VisitedLinkStore::create())
    228     , m_visitedLinksPopulated(false)
    229     , m_plugInAutoStartProvider(this)
    230     , m_alwaysUsesComplexTextCodePath(false)
    231     , m_shouldUseFontSmoothing(true)
    232     , m_memorySamplerEnabled(false)
    233     , m_memorySamplerInterval(1400.0)
    234226#if PLATFORM(MAC)
    235227    , m_highPerformanceGraphicsUsageSampler(std::make_unique<HighPerformanceGraphicsUsageSampler>(*this))
    236228    , m_perActivityStateCPUUsageSampler(std::make_unique<PerActivityStateCPUUsageSampler>(*this))
    237229#endif
    238     , m_shouldUseTestingNetworkSession(false)
    239     , m_processTerminationEnabled(true)
    240     , m_canHandleHTTPSServerTrustEvaluation(true)
    241     , m_didNetworkProcessCrash(false)
    242     , m_memoryCacheDisabled(false)
    243230    , m_alwaysRunsAtBackgroundPriority(m_configuration->alwaysRunsAtBackgroundPriority())
    244231    , m_shouldTakeUIBackgroundAssertion(m_configuration->shouldTakeUIBackgroundAssertion())
  • trunk/Source/WebKit/UIProcess/WebProcessPool.h

    r225622 r225694  
    488488
    489489    Vector<RefPtr<WebProcessProxy>> m_processes;
    490     bool m_haveInitialEmptyProcess;
    491 
    492     WebProcessProxy* m_processWithPageCache;
     490    bool m_haveInitialEmptyProcess { false };
     491
     492    WebProcessProxy* m_processWithPageCache { nullptr };
    493493#if ENABLE(SERVICE_WORKER)
    494494    ServiceWorkerProcessProxy* m_serviceWorkerProcess { nullptr };
     
    515515#endif
    516516    Ref<VisitedLinkStore> m_visitedLinkStore;
    517     bool m_visitedLinksPopulated;
    518 
    519     PlugInAutoStartProvider m_plugInAutoStartProvider;
     517    bool m_visitedLinksPopulated { false };
     518
     519    PlugInAutoStartProvider m_plugInAutoStartProvider { this };
    520520       
    521521    HashSet<String> m_schemesToRegisterAsEmptyDocument;
     
    530530    HashSet<String> m_schemesToRegisterAsCachePartitioned;
    531531
    532     bool m_alwaysUsesComplexTextCodePath;
    533     bool m_shouldUseFontSmoothing;
     532    bool m_alwaysUsesComplexTextCodePath { false };
     533    bool m_shouldUseFontSmoothing { true };
    534534
    535535    Vector<String> m_fontWhitelist;
     
    539539    Vector<std::pair<String, RefPtr<API::Object>>> m_messagesToInjectedBundlePostedToEmptyContext;
    540540
    541     bool m_memorySamplerEnabled;
    542     double m_memorySamplerInterval;
     541    bool m_memorySamplerEnabled { false };
     542    double m_memorySamplerInterval { 1400.0 };
    543543
    544544    RefPtr<API::WebsiteDataStore> m_websiteDataStore;
     
    566566    String m_overrideCookieStorageDirectory;
    567567
    568     bool m_shouldUseTestingNetworkSession;
    569 
    570     bool m_processTerminationEnabled;
    571 
    572     bool m_canHandleHTTPSServerTrustEvaluation;
    573     bool m_didNetworkProcessCrash;
     568    bool m_shouldUseTestingNetworkSession { false };
     569
     570    bool m_processTerminationEnabled { true };
     571
     572    bool m_canHandleHTTPSServerTrustEvaluation { true };
     573    bool m_didNetworkProcessCrash { false };
    574574    RefPtr<NetworkProcessProxy> m_networkProcess;
    575575    RefPtr<StorageProcessProxy> m_storageProcess;
     
    582582#endif
    583583
    584     bool m_memoryCacheDisabled;
     584    bool m_memoryCacheDisabled { false };
    585585    bool m_resourceLoadStatisticsEnabled { false };
    586586    bool m_javaScriptConfigurationFileEnabled { false };
Note: See TracChangeset for help on using the changeset viewer.