⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 249126 in webkit


Ignore:
Timestamp:
Aug 26, 2019, 5:20:31 PM (7 years ago)
Author:
Chris Dumez
Message:

Regression: ITP started doing a lot more IPC after its logic was moved to the network process
https://bugs.webkit.org/show_bug.cgi?id=201155

Reviewed by John Wilander.

Source/WebCore:

ITP started doing a lot more IPC after its logic was moved to the network process. Web processes used to
send their statistics to the UIProcess at most every 5 seconds. However, when the logic got moved to the network
process, we started notifying the network process via IPC after every sub resource load. This is bad for performance
and battery life. This patch restores the 5 second delay to address the issue.

  • loader/ResourceLoadObserver.cpp:

(WebCore::ResourceLoadObserver::ResourceLoadObserver):
(WebCore::ResourceLoadObserver::setRequestStorageAccessUnderOpenerCallback):
(WebCore::ResourceLoadObserver::logSubresourceLoading):
(WebCore::ResourceLoadObserver::logWebSocketLoading):
(WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution):
(WebCore::ResourceLoadObserver::scheduleNotificationIfNeeded):
(WebCore::ResourceLoadObserver::updateCentralStatisticsStore):
(WebCore::ResourceLoadObserver::clearState):

  • loader/ResourceLoadObserver.h:

Source/WebKit:

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::initializeWebProcess):

Location:
trunk/Source
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r249120 r249126  
     12019-08-26  Chris Dumez  <cdumez@apple.com>
     2
     3        Regression: ITP started doing a lot more IPC after its logic was moved to the network process
     4        https://bugs.webkit.org/show_bug.cgi?id=201155
     5
     6        Reviewed by John Wilander.
     7
     8        ITP started doing a lot more IPC after its logic was moved to the network process. Web processes used to
     9        send their statistics to the UIProcess at most every 5 seconds. However, when the logic got moved to the network
     10        process, we started notifying the network process via IPC after every sub resource load. This is bad for performance
     11        and battery life. This patch restores the 5 second delay to address the issue.
     12
     13        * loader/ResourceLoadObserver.cpp:
     14        (WebCore::ResourceLoadObserver::ResourceLoadObserver):
     15        (WebCore::ResourceLoadObserver::setRequestStorageAccessUnderOpenerCallback):
     16        (WebCore::ResourceLoadObserver::logSubresourceLoading):
     17        (WebCore::ResourceLoadObserver::logWebSocketLoading):
     18        (WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution):
     19        (WebCore::ResourceLoadObserver::scheduleNotificationIfNeeded):
     20        (WebCore::ResourceLoadObserver::updateCentralStatisticsStore):
     21        (WebCore::ResourceLoadObserver::clearState):
     22        * loader/ResourceLoadObserver.h:
     23
    1242019-08-26  Simon Fraser  <simon.fraser@apple.com>
    225
  • trunk/Source/WebCore/loader/ResourceLoadObserver.cpp

    r249056 r249126  
    4949static const Seconds minimumNotificationInterval { 5_s };
    5050
     51ResourceLoadObserver::ResourceLoadObserver()
     52    : m_notificationTimer(*this, &ResourceLoadObserver::updateCentralStatisticsStore)
     53{
     54}
     55
    5156ResourceLoadObserver& ResourceLoadObserver::shared()
    5257{
     
    7176    ASSERT(!m_logUserInteractionNotificationCallback);
    7277    m_logUserInteractionNotificationCallback = WTFMove(callback);
    73 }
    74 
    75 void ResourceLoadObserver::setLogWebSocketLoadingNotificationCallback(Function<void(PAL::SessionID, const RegistrableDomain&, const RegistrableDomain&, WallTime)>&& callback)
    76 {
    77     ASSERT(!m_logWebSocketLoadingNotificationCallback);
    78     m_logWebSocketLoadingNotificationCallback = WTFMove(callback);
    79 }
    80 
    81 void ResourceLoadObserver::setLogSubresourceLoadingNotificationCallback(Function<void(PAL::SessionID, const RegistrableDomain&, const RegistrableDomain&, WallTime)>&& callback)
    82 {
    83     ASSERT(!m_logSubresourceLoadingNotificationCallback);
    84     m_logSubresourceLoadingNotificationCallback = WTFMove(callback);
    85 }
    86 
    87 void ResourceLoadObserver::setLogSubresourceRedirectNotificationCallback(Function<void(PAL::SessionID, const RegistrableDomain&, const RegistrableDomain&)>&& callback)
    88 {
    89     ASSERT(!m_logSubresourceRedirectNotificationCallback);
    90     m_logSubresourceRedirectNotificationCallback = WTFMove(callback);
    9178}
    9279   
     
    136123        targetStatistics.subresourceUnderTopFrameDomains.add(topFrameDomain);
    137124
    138         m_logSubresourceLoadingNotificationCallback(page->sessionID(), targetDomain, topFrameDomain, lastSeen);
     125        scheduleNotificationIfNeeded();
    139126    }
    140127
     
    145132        targetStatistics.subresourceUniqueRedirectsFrom.add(redirectedFromDomain);
    146133
    147         m_logSubresourceRedirectNotificationCallback(page->sessionID(), redirectedFromDomain, targetDomain);
     134        scheduleNotificationIfNeeded();
    148135    }
    149136}
     
    172159    targetStatistics.subresourceUnderTopFrameDomains.add(topFrameDomain);
    173160
    174     m_logWebSocketLoadingNotificationCallback(sessionID, targetDomain, topFrameDomain, lastSeen);
     161    scheduleNotificationIfNeeded();
    175162}
    176163
     
    209196    }
    210197
     198    // We notify right away in case of a user interaction instead of waiting the usual 5 seconds because we want
     199    // to update cookie blocking state as quickly as possible.
    211200    m_logUserInteractionNotificationCallback(document.sessionID(), topFrameDomain);
    212201#endif
     
    371360}
    372361
     362void ResourceLoadObserver::scheduleNotificationIfNeeded()
     363{
     364    ASSERT(m_notificationCallback);
     365    if (m_perSessionResourceStatisticsMap.isEmpty()) {
     366        m_notificationTimer.stop();
     367        return;
     368    }
     369
     370    if (!m_notificationTimer.isActive())
     371        m_notificationTimer.startOneShot(minimumNotificationInterval);
     372}
     373
    373374void ResourceLoadObserver::updateCentralStatisticsStore()
    374375{
     376    ASSERT(m_notificationCallback);
     377    m_notificationTimer.stop();
    375378    m_notificationCallback(takeStatistics());
    376379}
     
    409412void ResourceLoadObserver::clearState()
    410413{
     414    m_notificationTimer.stop();
    411415    m_perSessionResourceStatisticsMap.clear();
    412416    m_lastReportedUserInteractionMap.clear();
  • trunk/Source/WebCore/loader/ResourceLoadObserver.h

    r249056 r249126  
    7878    WEBCORE_EXPORT void setRequestStorageAccessUnderOpenerCallback(Function<void(PAL::SessionID, const RegistrableDomain&, PageIdentifier, const RegistrableDomain&)>&&);
    7979    WEBCORE_EXPORT void setLogUserInteractionNotificationCallback(Function<void(PAL::SessionID, const RegistrableDomain&)>&&);
    80     WEBCORE_EXPORT void setLogWebSocketLoadingNotificationCallback(Function<void(PAL::SessionID, const RegistrableDomain&, const RegistrableDomain&, WallTime)>&&);
    81     WEBCORE_EXPORT void setLogSubresourceLoadingNotificationCallback(Function<void(PAL::SessionID, const RegistrableDomain&, const RegistrableDomain&, WallTime)>&&);
    82     WEBCORE_EXPORT void setLogSubresourceRedirectNotificationCallback(Function<void(PAL::SessionID, const RegistrableDomain&, const RegistrableDomain&)>&&);
    8380
    8481    WEBCORE_EXPORT void updateCentralStatisticsStore();
     
    9188
    9289private:
     90    ResourceLoadObserver();
     91
    9392    bool shouldLog(PAL::SessionID) const;
    9493    ResourceLoadStatistics& ensureResourceStatisticsForRegistrableDomain(PAL::SessionID, const RegistrableDomain&);
     94    void scheduleNotificationIfNeeded();
    9595
    9696    PerSessionResourceLoadData takeStatistics();
     
    105105    Function<void(PAL::SessionID, const RegistrableDomain&, PageIdentifier, const RegistrableDomain&)> m_requestStorageAccessUnderOpenerCallback;
    106106    Function<void(PAL::SessionID, const RegistrableDomain&)> m_logUserInteractionNotificationCallback;
    107     Function<void(PAL::SessionID, const RegistrableDomain&, const RegistrableDomain&, WallTime)> m_logWebSocketLoadingNotificationCallback;
    108     Function<void(PAL::SessionID, const RegistrableDomain&, const RegistrableDomain&, WallTime)> m_logSubresourceLoadingNotificationCallback;
    109     Function<void(PAL::SessionID, const RegistrableDomain&, const RegistrableDomain&)> m_logSubresourceRedirectNotificationCallback;
     107
     108    Timer m_notificationTimer;
     109
    110110#if ENABLE(RESOURCE_LOAD_STATISTICS) && !RELEASE_LOG_DISABLED
    111111    uint64_t m_loggingCounter { 0 };
  • trunk/Source/WebKit/ChangeLog

    r249112 r249126  
     12019-08-26  Chris Dumez  <cdumez@apple.com>
     2
     3        Regression: ITP started doing a lot more IPC after its logic was moved to the network process
     4        https://bugs.webkit.org/show_bug.cgi?id=201155
     5
     6        Reviewed by John Wilander.
     7
     8        * WebProcess/WebProcess.cpp:
     9        (WebKit::WebProcess::initializeWebProcess):
     10
    1112019-08-26  Wenson Hsieh  <wenson_hsieh@apple.com>
    212
  • trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp

    r248956 r249126  
    934934}
    935935
    936 void ResourceLoadStatisticsDatabaseStore::logSubresourceLoading(const SubResourceDomain& targetDomain, const TopFrameDomain& topFrameDomain, WallTime lastSeen)
    937 {
    938     ASSERT(!RunLoop::isMain());
    939 
    940     auto result = ensureResourceStatisticsForRegistrableDomain(targetDomain);
    941     updateLastSeen(targetDomain, lastSeen);
    942 
    943     auto targetDomainID = result.second;
    944     if (!relationshipExists(m_subresourceUnderTopFrameDomainExists, targetDomainID, topFrameDomain)) {
    945         insertDomainRelationship(m_subresourceUnderTopFrameDomains, targetDomainID, topFrameDomain);
    946         scheduleStatisticsProcessingRequestIfNecessary();
    947     }
    948 }
    949 
    950 void ResourceLoadStatisticsDatabaseStore::logSubresourceRedirect(const RedirectedFromDomain& sourceDomain, const RedirectedToDomain& targetDomain)
    951 {
    952     ASSERT(!RunLoop::isMain());
    953 
    954     auto sourceDomainResult = ensureResourceStatisticsForRegistrableDomain(sourceDomain);
    955     auto targetDomainResult = ensureResourceStatisticsForRegistrableDomain(targetDomain);
    956 
    957     bool isNewRedirectToEntry = false;
    958     if (!relationshipExists(m_subresourceUniqueRedirectsToExists, sourceDomainResult.second, targetDomain)) {
    959         insertDomainRelationship(m_subresourceUniqueRedirectsTo, sourceDomainResult.second, targetDomain);
    960         isNewRedirectToEntry = true;
    961     }
    962 
    963     bool isNewRedirectFromEntry = false;
    964     if (!relationshipExists(m_subresourceUniqueRedirectsFromExists, targetDomainResult.second, sourceDomain)) {
    965         insertDomainRelationship(m_subresourceUniqueRedirectsFrom, targetDomainResult.second, sourceDomain);
    966         isNewRedirectFromEntry = true;
    967     }
    968 
    969     if (isNewRedirectToEntry || isNewRedirectFromEntry)
    970         scheduleStatisticsProcessingRequestIfNecessary();
    971 }
    972 
    973936void ResourceLoadStatisticsDatabaseStore::logCrossSiteLoadWithLinkDecoration(const NavigatedFromDomain& fromDomain, const NavigatedToDomain& toDomain)
    974937{
  • trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h

    r248956 r249126  
    9898    void logFrameNavigation(const NavigatedToDomain&, const TopFrameDomain&, const NavigatedFromDomain&, bool isRedirect, bool isMainFrame) override;
    9999    void logUserInteraction(const TopFrameDomain&) override;
    100     void logSubresourceLoading(const SubResourceDomain&, const TopFrameDomain&, WallTime lastSeen) override;
    101     void logSubresourceRedirect(const RedirectedFromDomain&, const RedirectedToDomain&) override;
    102100    void logCrossSiteLoadWithLinkDecoration(const NavigatedFromDomain&, const NavigatedToDomain&) override;
    103101
  • trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp

    r248956 r249126  
    397397}
    398398
    399 void ResourceLoadStatisticsMemoryStore::logSubresourceLoading(const SubResourceDomain& targetDomain, const TopFrameDomain& topFrameDomain, WallTime lastSeen)
    400 {
    401     ASSERT(!RunLoop::isMain());
    402 
    403     auto& targetStatistics = ensureResourceStatisticsForRegistrableDomain(targetDomain);
    404     targetStatistics.lastSeen = lastSeen;
    405     if (targetStatistics.subresourceUnderTopFrameDomains.add(topFrameDomain).isNewEntry)
    406         scheduleStatisticsProcessingRequestIfNecessary();
    407 }
    408 
    409 void ResourceLoadStatisticsMemoryStore::logSubresourceRedirect(const RedirectedFromDomain& sourceDomain, const RedirectedToDomain& targetDomain)
    410 {
    411     ASSERT(!RunLoop::isMain());
    412 
    413     auto& redirectingDomainStatistics = ensureResourceStatisticsForRegistrableDomain(sourceDomain);
    414     bool isNewRedirectToEntry = redirectingDomainStatistics.subresourceUniqueRedirectsTo.add(targetDomain).isNewEntry;
    415     auto& targetStatistics = ensureResourceStatisticsForRegistrableDomain(targetDomain);
    416     bool isNewRedirectFromEntry = targetStatistics.subresourceUniqueRedirectsFrom.add(sourceDomain).isNewEntry;
    417 
    418     if (isNewRedirectToEntry || isNewRedirectFromEntry)
    419         scheduleStatisticsProcessingRequestIfNecessary();
    420 }
    421 
    422399void ResourceLoadStatisticsMemoryStore::logUserInteraction(const TopFrameDomain& domain)
    423400{
  • trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.h

    r248956 r249126  
    104104    void logFrameNavigation(const NavigatedToDomain&, const TopFrameDomain&, const NavigatedFromDomain&, bool isRedirect, bool isMainFrame) override;
    105105    void logUserInteraction(const TopFrameDomain&) override;
    106     void logSubresourceLoading(const SubResourceDomain&, const TopFrameDomain&, WallTime lastSeen) override;
    107     void logSubresourceRedirect(const RedirectedFromDomain&, const RedirectedToDomain&) override;
    108106    void logCrossSiteLoadWithLinkDecoration(const NavigatedFromDomain&, const NavigatedToDomain&) override;
    109107
  • trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsStore.h

    r248956 r249126  
    167167    virtual void logFrameNavigation(const NavigatedToDomain&, const TopFrameDomain&, const NavigatedFromDomain&, bool isRedirect, bool isMainFrame) = 0;
    168168    virtual void logUserInteraction(const TopFrameDomain&) = 0;
    169     virtual void logSubresourceLoading(const SubResourceDomain&, const TopFrameDomain&, WallTime lastSeen) = 0;
    170     virtual void logSubresourceRedirect(const RedirectedFromDomain&, const RedirectedToDomain&) = 0;
    171169    virtual void logCrossSiteLoadWithLinkDecoration(const NavigatedFromDomain&, const NavigatedToDomain&) = 0;
    172170
  • trunk/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp

    r248956 r249126  
    528528}
    529529
    530 void WebResourceLoadStatisticsStore::logWebSocketLoading(const RegistrableDomain& targetDomain, const RegistrableDomain& topFrameDomain, WallTime lastSeen, CompletionHandler<void()>&& completionHandler)
    531 {
    532     ASSERT(RunLoop::isMain());
    533 
    534     postTask([this, targetDomain = targetDomain.isolatedCopy(), topFrameDomain = topFrameDomain.isolatedCopy(), lastSeen, completionHandler = WTFMove(completionHandler)]() mutable {
    535         if (m_statisticsStore)
    536             m_statisticsStore->logSubresourceLoading(targetDomain, topFrameDomain, lastSeen);
    537 
    538         postTaskReply(WTFMove(completionHandler));
    539     });
    540 }
    541 
    542 void WebResourceLoadStatisticsStore::logSubresourceLoading(const SubResourceDomain& targetDomain, const TopFrameDomain& topFrameDomain, WallTime lastSeen, CompletionHandler<void()>&& completionHandler)
    543 {
    544     ASSERT(RunLoop::isMain());
    545 
    546     postTask([this, targetDomain = targetDomain.isolatedCopy(), topFrameDomain = topFrameDomain.isolatedCopy(), lastSeen, completionHandler = WTFMove(completionHandler)]() mutable {
    547         if (m_statisticsStore)
    548             m_statisticsStore->logSubresourceLoading(targetDomain, topFrameDomain, lastSeen);
    549 
    550         postTaskReply(WTFMove(completionHandler));
    551     });
    552 }
    553 
    554 void WebResourceLoadStatisticsStore::logSubresourceRedirect(const RegistrableDomain& sourceDomain, const RegistrableDomain& targetDomain, CompletionHandler<void()>&& completionHandler)
    555 {
    556     ASSERT(RunLoop::isMain());
    557 
    558     postTask([this, sourceDomain = sourceDomain.isolatedCopy(), targetDomain = targetDomain.isolatedCopy(), completionHandler = WTFMove(completionHandler)]() mutable {
    559         if (m_statisticsStore)
    560             m_statisticsStore->logSubresourceRedirect(sourceDomain, targetDomain);
    561         postTaskReply(WTFMove(completionHandler));
    562     });
    563 }
    564 
    565530void WebResourceLoadStatisticsStore::logUserInteraction(const RegistrableDomain& domain, CompletionHandler<void()>&& completionHandler)
    566531{
  • trunk/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h

    r248956 r249126  
    119119    void logFrameNavigation(const NavigatedToDomain&, const TopFrameDomain&, const NavigatedFromDomain&, bool isRedirect, bool isMainFrame);
    120120    void logUserInteraction(const TopFrameDomain&, CompletionHandler<void()>&&);
    121     void logWebSocketLoading(const SubResourceDomain&, const TopFrameDomain&, WallTime lastSeen, CompletionHandler<void()>&&);
    122     void logSubresourceLoading(const SubResourceDomain&, const TopFrameDomain&, WallTime lastSeen, CompletionHandler<void()>&&);
    123     void logSubresourceRedirect(const RedirectedFromDomain&, const RedirectedToDomain&, CompletionHandler<void()>&&);
    124121    void logCrossSiteLoadWithLinkDecoration(const NavigatedFromDomain&, const NavigatedToDomain&, CompletionHandler<void()>&&);
    125122    void clearUserInteraction(const TopFrameDomain&, CompletionHandler<void()>&&);
  • trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp

    r249056 r249126  
    690690}
    691691
    692 void NetworkConnectionToWebProcess::logWebSocketLoading(PAL::SessionID sessionID, const RegistrableDomain& targetDomain, const RegistrableDomain& topFrameDomain, WallTime lastSeen)
    693 {
    694     if (auto* networkSession = networkProcess().networkSession(sessionID)) {
    695         if (auto* resourceLoadStatistics = networkSession->resourceLoadStatistics())
    696             resourceLoadStatistics->logWebSocketLoading(targetDomain, topFrameDomain, lastSeen, [] { });
    697     }
    698 }
    699 
    700 void NetworkConnectionToWebProcess::logSubresourceLoading(PAL::SessionID sessionID, const RegistrableDomain& targetDomain, const RegistrableDomain& topFrameDomain, WallTime lastSeen)
    701 {
    702     if (auto* networkSession = networkProcess().networkSession(sessionID)) {
    703         if (auto* resourceLoadStatistics = networkSession->resourceLoadStatistics())
    704             resourceLoadStatistics->logSubresourceLoading(targetDomain, topFrameDomain, lastSeen, [] { });
    705     }
    706 }
    707 
    708 void NetworkConnectionToWebProcess::logSubresourceRedirect(PAL::SessionID sessionID, const RegistrableDomain& sourceDomain, const RegistrableDomain& targetDomain)
    709 {
    710     if (auto* networkSession = networkProcess().networkSession(sessionID)) {
    711         if (auto* resourceLoadStatistics = networkSession->resourceLoadStatistics())
    712             resourceLoadStatistics->logSubresourceRedirect(sourceDomain, targetDomain, [] { });
    713     }
    714 }
    715 
    716692void NetworkConnectionToWebProcess::resourceLoadStatisticsUpdated(ResourceLoadObserver::PerSessionResourceLoadData&& statistics)
    717693{
  • trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h

    r249056 r249126  
    221221
    222222    void logUserInteraction(PAL::SessionID, const RegistrableDomain&);
    223     void logWebSocketLoading(PAL::SessionID, const RegistrableDomain& targetDomain, const RegistrableDomain& topFrameDomain, WallTime lastSeen);
    224     void logSubresourceLoading(PAL::SessionID, const RegistrableDomain& targetDomain, const RegistrableDomain& topFrameDomain, WallTime lastSeen);
    225     void logSubresourceRedirect(PAL::SessionID, const RegistrableDomain& sourceDomain, const RegistrableDomain& targetDomain);
    226223    void resourceLoadStatisticsUpdated(WebCore::ResourceLoadObserver::PerSessionResourceLoadData&&);
    227224    void hasStorageAccess(PAL::SessionID, const RegistrableDomain& subFrameDomain, const RegistrableDomain& topFrameDomain, WebCore::FrameIdentifier, WebCore::PageIdentifier, CompletionHandler<void(bool)>&&);
  • trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in

    r249056 r249126  
    6262    ClearPageSpecificDataForResourceLoadStatistics(PAL::SessionID sessionID, WebCore::PageIdentifier pageID);
    6363    LogUserInteraction(PAL::SessionID sessionID, WebCore::RegistrableDomain domain)
    64     LogWebSocketLoading(PAL::SessionID sessionID, WebCore::RegistrableDomain targetDomain, WebCore::RegistrableDomain topFrameDomain, WallTime lastSeen)
    65     LogSubresourceLoading(PAL::SessionID sessionID, WebCore::RegistrableDomain targetDomain, WebCore::RegistrableDomain topFrameDomain, WallTime lastSeen)
    66     LogSubresourceRedirect(PAL::SessionID sessionID, WebCore::RegistrableDomain sourceDomain, WebCore::RegistrableDomain targetDomain)
    6764    ResourceLoadStatisticsUpdated(Vector<std::pair<PAL::SessionID, Vector<WebCore::ResourceLoadStatistics>>> statistics)
    6865    HasStorageAccess(PAL::SessionID sessionID, WebCore::RegistrableDomain subFrameDomain, WebCore::RegistrableDomain topFrameDomain, WebCore::FrameIdentifier frameID, WebCore::PageIdentifier pageID) -> (bool hasStorageAccess) Async
  • trunk/Source/WebKit/WebProcess/WebProcess.cpp

    r249056 r249126  
    225225        ensureNetworkProcessConnection().connection().send(Messages::NetworkConnectionToWebProcess::RequestStorageAccessUnderOpener(sessionID, domainInNeedOfStorageAccess, openerPageID, openerDomain), 0);
    226226    });
     227   
     228    ResourceLoadObserver::shared().setLogUserInteractionNotificationCallback([this] (PAL::SessionID sessionID, const RegistrableDomain& domain) {    ensureNetworkProcessConnection().connection().send(Messages::NetworkConnectionToWebProcess::LogUserInteraction(sessionID, domain), 0);
     229    });
    227230#endif
    228231   
     
    396399
    397400    ensureNetworkProcessConnection();
    398 
    399 #if ENABLE(RESOURCE_LOAD_STATISTICS)
    400     ResourceLoadObserver::shared().setLogUserInteractionNotificationCallback([this] (PAL::SessionID sessionID, const RegistrableDomain& domain) {
    401         ensureNetworkProcessConnection().connection().send(Messages::NetworkConnectionToWebProcess::LogUserInteraction(sessionID, domain), 0);
    402     });
    403 
    404     ResourceLoadObserver::shared().setLogWebSocketLoadingNotificationCallback([this] (PAL::SessionID sessionID, const RegistrableDomain& targetDomain, const RegistrableDomain& topFrameDomain, WallTime lastSeen) {
    405         ensureNetworkProcessConnection().connection().send(Messages::NetworkConnectionToWebProcess::LogWebSocketLoading(sessionID, targetDomain, topFrameDomain, lastSeen), 0);
    406     });
    407    
    408     ResourceLoadObserver::shared().setLogSubresourceLoadingNotificationCallback([this] (PAL::SessionID sessionID, const RegistrableDomain& targetDomain, const RegistrableDomain& topFrameDomain, WallTime lastSeen) {
    409         ensureNetworkProcessConnection().connection().send(Messages::NetworkConnectionToWebProcess::LogSubresourceLoading(sessionID, targetDomain, topFrameDomain, lastSeen), 0);
    410     });
    411 
    412     ResourceLoadObserver::shared().setLogSubresourceRedirectNotificationCallback([this] (PAL::SessionID sessionID, const RegistrableDomain& sourceDomain, const RegistrableDomain& targetDomain) {
    413         ensureNetworkProcessConnection().connection().send(Messages::NetworkConnectionToWebProcess::LogSubresourceRedirect(sessionID, sourceDomain, targetDomain), 0);
    414     });
    415 #endif
    416401
    417402    setTerminationTimeout(parameters.terminationTimeout);
Note: See TracChangeset for help on using the changeset viewer.