Title: [249126] trunk/Source
Revision
249126
Author
[email protected]
Date
2019-08-26 17:20:31 -0700 (Mon, 26 Aug 2019)

Log 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):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (249125 => 249126)


--- trunk/Source/WebCore/ChangeLog	2019-08-27 00:18:57 UTC (rev 249125)
+++ trunk/Source/WebCore/ChangeLog	2019-08-27 00:20:31 UTC (rev 249126)
@@ -1,3 +1,26 @@
+2019-08-26  Chris Dumez  <[email protected]>
+
+        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.
+
+        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:
+
 2019-08-26  Simon Fraser  <[email protected]>
 
         Optimize computation of AbsoluteClipRects clip rects

Modified: trunk/Source/WebCore/loader/ResourceLoadObserver.cpp (249125 => 249126)


--- trunk/Source/WebCore/loader/ResourceLoadObserver.cpp	2019-08-27 00:18:57 UTC (rev 249125)
+++ trunk/Source/WebCore/loader/ResourceLoadObserver.cpp	2019-08-27 00:20:31 UTC (rev 249126)
@@ -48,6 +48,11 @@
 
 static const Seconds minimumNotificationInterval { 5_s };
 
+ResourceLoadObserver::ResourceLoadObserver()
+    : m_notificationTimer(*this, &ResourceLoadObserver::updateCentralStatisticsStore)
+{
+}
+
 ResourceLoadObserver& ResourceLoadObserver::shared()
 {
     static NeverDestroyed<ResourceLoadObserver> resourceLoadObserver;
@@ -71,24 +76,6 @@
     ASSERT(!m_logUserInteractionNotificationCallback);
     m_logUserInteractionNotificationCallback = WTFMove(callback);
 }
-
-void ResourceLoadObserver::setLogWebSocketLoadingNotificationCallback(Function<void(PAL::SessionID, const RegistrableDomain&, const RegistrableDomain&, WallTime)>&& callback)
-{
-    ASSERT(!m_logWebSocketLoadingNotificationCallback);
-    m_logWebSocketLoadingNotificationCallback = WTFMove(callback);
-}
-
-void ResourceLoadObserver::setLogSubresourceLoadingNotificationCallback(Function<void(PAL::SessionID, const RegistrableDomain&, const RegistrableDomain&, WallTime)>&& callback)
-{
-    ASSERT(!m_logSubresourceLoadingNotificationCallback);
-    m_logSubresourceLoadingNotificationCallback = WTFMove(callback);
-}
-
-void ResourceLoadObserver::setLogSubresourceRedirectNotificationCallback(Function<void(PAL::SessionID, const RegistrableDomain&, const RegistrableDomain&)>&& callback)
-{
-    ASSERT(!m_logSubresourceRedirectNotificationCallback);
-    m_logSubresourceRedirectNotificationCallback = WTFMove(callback);
-}
     
 static inline bool is3xxRedirect(const ResourceResponse& response)
 {
@@ -135,7 +122,7 @@
         targetStatistics.lastSeen = lastSeen;
         targetStatistics.subresourceUnderTopFrameDomains.add(topFrameDomain);
 
-        m_logSubresourceLoadingNotificationCallback(page->sessionID(), targetDomain, topFrameDomain, lastSeen);
+        scheduleNotificationIfNeeded();
     }
 
     if (isRedirect) {
@@ -144,7 +131,7 @@
         auto& targetStatistics = ensureResourceStatisticsForRegistrableDomain(page->sessionID(), targetDomain);
         targetStatistics.subresourceUniqueRedirectsFrom.add(redirectedFromDomain);
 
-        m_logSubresourceRedirectNotificationCallback(page->sessionID(), redirectedFromDomain, targetDomain);
+        scheduleNotificationIfNeeded();
     }
 }
 
@@ -171,7 +158,7 @@
     targetStatistics.lastSeen = lastSeen;
     targetStatistics.subresourceUnderTopFrameDomains.add(topFrameDomain);
 
-    m_logWebSocketLoadingNotificationCallback(sessionID, targetDomain, topFrameDomain, lastSeen);
+    scheduleNotificationIfNeeded();
 }
 
 void ResourceLoadObserver::logUserInteractionWithReducedTimeResolution(const Document& document)
@@ -208,6 +195,8 @@
         }
     }
 
+    // We notify right away in case of a user interaction instead of waiting the usual 5 seconds because we want
+    // to update cookie blocking state as quickly as possible.
     m_logUserInteractionNotificationCallback(document.sessionID(), topFrameDomain);
 #endif
 
@@ -370,8 +359,22 @@
     return addDomainResult.iterator->value;
 }
 
+void ResourceLoadObserver::scheduleNotificationIfNeeded()
+{
+    ASSERT(m_notificationCallback);
+    if (m_perSessionResourceStatisticsMap.isEmpty()) {
+        m_notificationTimer.stop();
+        return;
+    }
+
+    if (!m_notificationTimer.isActive())
+        m_notificationTimer.startOneShot(minimumNotificationInterval);
+}
+
 void ResourceLoadObserver::updateCentralStatisticsStore()
 {
+    ASSERT(m_notificationCallback);
+    m_notificationTimer.stop();
     m_notificationCallback(takeStatistics());
 }
 
@@ -408,6 +411,7 @@
 
 void ResourceLoadObserver::clearState()
 {
+    m_notificationTimer.stop();
     m_perSessionResourceStatisticsMap.clear();
     m_lastReportedUserInteractionMap.clear();
 }

Modified: trunk/Source/WebCore/loader/ResourceLoadObserver.h (249125 => 249126)


--- trunk/Source/WebCore/loader/ResourceLoadObserver.h	2019-08-27 00:18:57 UTC (rev 249125)
+++ trunk/Source/WebCore/loader/ResourceLoadObserver.h	2019-08-27 00:20:31 UTC (rev 249126)
@@ -77,9 +77,6 @@
     WEBCORE_EXPORT void setStatisticsUpdatedCallback(Function<void(PerSessionResourceLoadData&&)>&&);
     WEBCORE_EXPORT void setRequestStorageAccessUnderOpenerCallback(Function<void(PAL::SessionID, const RegistrableDomain&, PageIdentifier, const RegistrableDomain&)>&&);
     WEBCORE_EXPORT void setLogUserInteractionNotificationCallback(Function<void(PAL::SessionID, const RegistrableDomain&)>&&);
-    WEBCORE_EXPORT void setLogWebSocketLoadingNotificationCallback(Function<void(PAL::SessionID, const RegistrableDomain&, const RegistrableDomain&, WallTime)>&&);
-    WEBCORE_EXPORT void setLogSubresourceLoadingNotificationCallback(Function<void(PAL::SessionID, const RegistrableDomain&, const RegistrableDomain&, WallTime)>&&);
-    WEBCORE_EXPORT void setLogSubresourceRedirectNotificationCallback(Function<void(PAL::SessionID, const RegistrableDomain&, const RegistrableDomain&)>&&);
 
     WEBCORE_EXPORT void updateCentralStatisticsStore();
     WEBCORE_EXPORT void clearState();
@@ -90,8 +87,11 @@
 #endif
 
 private:
+    ResourceLoadObserver();
+
     bool shouldLog(PAL::SessionID) const;
     ResourceLoadStatistics& ensureResourceStatisticsForRegistrableDomain(PAL::SessionID, const RegistrableDomain&);
+    void scheduleNotificationIfNeeded();
 
     PerSessionResourceLoadData takeStatistics();
 
@@ -104,9 +104,9 @@
     Function<void(PerSessionResourceLoadData)> m_notificationCallback;
     Function<void(PAL::SessionID, const RegistrableDomain&, PageIdentifier, const RegistrableDomain&)> m_requestStorageAccessUnderOpenerCallback;
     Function<void(PAL::SessionID, const RegistrableDomain&)> m_logUserInteractionNotificationCallback;
-    Function<void(PAL::SessionID, const RegistrableDomain&, const RegistrableDomain&, WallTime)> m_logWebSocketLoadingNotificationCallback;
-    Function<void(PAL::SessionID, const RegistrableDomain&, const RegistrableDomain&, WallTime)> m_logSubresourceLoadingNotificationCallback;
-    Function<void(PAL::SessionID, const RegistrableDomain&, const RegistrableDomain&)> m_logSubresourceRedirectNotificationCallback;
+
+    Timer m_notificationTimer;
+
 #if ENABLE(RESOURCE_LOAD_STATISTICS) && !RELEASE_LOG_DISABLED
     uint64_t m_loggingCounter { 0 };
     bool m_shouldLogUserInteraction { false };

Modified: trunk/Source/WebKit/ChangeLog (249125 => 249126)


--- trunk/Source/WebKit/ChangeLog	2019-08-27 00:18:57 UTC (rev 249125)
+++ trunk/Source/WebKit/ChangeLog	2019-08-27 00:20:31 UTC (rev 249126)
@@ -1,3 +1,13 @@
+2019-08-26  Chris Dumez  <[email protected]>
+
+        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.
+
+        * WebProcess/WebProcess.cpp:
+        (WebKit::WebProcess::initializeWebProcess):
+
 2019-08-26  Wenson Hsieh  <[email protected]>
 
         REGRESSION (iOS 13): Tests that simulate multiple back-to-back single taps fail or time out

Modified: trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp (249125 => 249126)


--- trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp	2019-08-27 00:18:57 UTC (rev 249125)
+++ trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp	2019-08-27 00:20:31 UTC (rev 249126)
@@ -933,43 +933,6 @@
         scheduleStatisticsProcessingRequestIfNecessary();
 }
 
-void ResourceLoadStatisticsDatabaseStore::logSubresourceLoading(const SubResourceDomain& targetDomain, const TopFrameDomain& topFrameDomain, WallTime lastSeen)
-{
-    ASSERT(!RunLoop::isMain());
-
-    auto result = ensureResourceStatisticsForRegistrableDomain(targetDomain);
-    updateLastSeen(targetDomain, lastSeen);
-
-    auto targetDomainID = result.second;
-    if (!relationshipExists(m_subresourceUnderTopFrameDomainExists, targetDomainID, topFrameDomain)) {
-        insertDomainRelationship(m_subresourceUnderTopFrameDomains, targetDomainID, topFrameDomain);
-        scheduleStatisticsProcessingRequestIfNecessary();
-    }
-}
-
-void ResourceLoadStatisticsDatabaseStore::logSubresourceRedirect(const RedirectedFromDomain& sourceDomain, const RedirectedToDomain& targetDomain)
-{
-    ASSERT(!RunLoop::isMain());
-
-    auto sourceDomainResult = ensureResourceStatisticsForRegistrableDomain(sourceDomain);
-    auto targetDomainResult = ensureResourceStatisticsForRegistrableDomain(targetDomain);
-
-    bool isNewRedirectToEntry = false;
-    if (!relationshipExists(m_subresourceUniqueRedirectsToExists, sourceDomainResult.second, targetDomain)) {
-        insertDomainRelationship(m_subresourceUniqueRedirectsTo, sourceDomainResult.second, targetDomain);
-        isNewRedirectToEntry = true;
-    }
-
-    bool isNewRedirectFromEntry = false;
-    if (!relationshipExists(m_subresourceUniqueRedirectsFromExists, targetDomainResult.second, sourceDomain)) {
-        insertDomainRelationship(m_subresourceUniqueRedirectsFrom, targetDomainResult.second, sourceDomain);
-        isNewRedirectFromEntry = true;
-    }
-
-    if (isNewRedirectToEntry || isNewRedirectFromEntry)
-        scheduleStatisticsProcessingRequestIfNecessary();
-}
-
 void ResourceLoadStatisticsDatabaseStore::logCrossSiteLoadWithLinkDecoration(const NavigatedFromDomain& fromDomain, const NavigatedToDomain& toDomain)
 {
     ASSERT(!RunLoop::isMain());

Modified: trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h (249125 => 249126)


--- trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h	2019-08-27 00:18:57 UTC (rev 249125)
+++ trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h	2019-08-27 00:20:31 UTC (rev 249126)
@@ -97,8 +97,6 @@
 
     void logFrameNavigation(const NavigatedToDomain&, const TopFrameDomain&, const NavigatedFromDomain&, bool isRedirect, bool isMainFrame) override;
     void logUserInteraction(const TopFrameDomain&) override;
-    void logSubresourceLoading(const SubResourceDomain&, const TopFrameDomain&, WallTime lastSeen) override;
-    void logSubresourceRedirect(const RedirectedFromDomain&, const RedirectedToDomain&) override;
     void logCrossSiteLoadWithLinkDecoration(const NavigatedFromDomain&, const NavigatedToDomain&) override;
 
     void clearUserInteraction(const RegistrableDomain&) override;

Modified: trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp (249125 => 249126)


--- trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp	2019-08-27 00:18:57 UTC (rev 249125)
+++ trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp	2019-08-27 00:20:31 UTC (rev 249126)
@@ -396,29 +396,6 @@
         scheduleStatisticsProcessingRequestIfNecessary();
 }
 
-void ResourceLoadStatisticsMemoryStore::logSubresourceLoading(const SubResourceDomain& targetDomain, const TopFrameDomain& topFrameDomain, WallTime lastSeen)
-{
-    ASSERT(!RunLoop::isMain());
-
-    auto& targetStatistics = ensureResourceStatisticsForRegistrableDomain(targetDomain);
-    targetStatistics.lastSeen = lastSeen;
-    if (targetStatistics.subresourceUnderTopFrameDomains.add(topFrameDomain).isNewEntry)
-        scheduleStatisticsProcessingRequestIfNecessary();
-}
-
-void ResourceLoadStatisticsMemoryStore::logSubresourceRedirect(const RedirectedFromDomain& sourceDomain, const RedirectedToDomain& targetDomain)
-{
-    ASSERT(!RunLoop::isMain());
-
-    auto& redirectingDomainStatistics = ensureResourceStatisticsForRegistrableDomain(sourceDomain);
-    bool isNewRedirectToEntry = redirectingDomainStatistics.subresourceUniqueRedirectsTo.add(targetDomain).isNewEntry;
-    auto& targetStatistics = ensureResourceStatisticsForRegistrableDomain(targetDomain);
-    bool isNewRedirectFromEntry = targetStatistics.subresourceUniqueRedirectsFrom.add(sourceDomain).isNewEntry;
-
-    if (isNewRedirectToEntry || isNewRedirectFromEntry)
-        scheduleStatisticsProcessingRequestIfNecessary();
-}
-
 void ResourceLoadStatisticsMemoryStore::logUserInteraction(const TopFrameDomain& domain)
 {
     ASSERT(!RunLoop::isMain());

Modified: trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.h (249125 => 249126)


--- trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.h	2019-08-27 00:18:57 UTC (rev 249125)
+++ trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.h	2019-08-27 00:20:31 UTC (rev 249126)
@@ -103,8 +103,6 @@
 
     void logFrameNavigation(const NavigatedToDomain&, const TopFrameDomain&, const NavigatedFromDomain&, bool isRedirect, bool isMainFrame) override;
     void logUserInteraction(const TopFrameDomain&) override;
-    void logSubresourceLoading(const SubResourceDomain&, const TopFrameDomain&, WallTime lastSeen) override;
-    void logSubresourceRedirect(const RedirectedFromDomain&, const RedirectedToDomain&) override;
     void logCrossSiteLoadWithLinkDecoration(const NavigatedFromDomain&, const NavigatedToDomain&) override;
 
     void clearUserInteraction(const RegistrableDomain&) override;

Modified: trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsStore.h (249125 => 249126)


--- trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsStore.h	2019-08-27 00:18:57 UTC (rev 249125)
+++ trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsStore.h	2019-08-27 00:20:31 UTC (rev 249126)
@@ -166,8 +166,6 @@
 
     virtual void logFrameNavigation(const NavigatedToDomain&, const TopFrameDomain&, const NavigatedFromDomain&, bool isRedirect, bool isMainFrame) = 0;
     virtual void logUserInteraction(const TopFrameDomain&) = 0;
-    virtual void logSubresourceLoading(const SubResourceDomain&, const TopFrameDomain&, WallTime lastSeen) = 0;
-    virtual void logSubresourceRedirect(const RedirectedFromDomain&, const RedirectedToDomain&) = 0;
     virtual void logCrossSiteLoadWithLinkDecoration(const NavigatedFromDomain&, const NavigatedToDomain&) = 0;
 
     virtual void clearUserInteraction(const RegistrableDomain&) = 0;

Modified: trunk/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp (249125 => 249126)


--- trunk/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp	2019-08-27 00:18:57 UTC (rev 249125)
+++ trunk/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp	2019-08-27 00:20:31 UTC (rev 249126)
@@ -527,41 +527,6 @@
     });
 }
 
-void WebResourceLoadStatisticsStore::logWebSocketLoading(const RegistrableDomain& targetDomain, const RegistrableDomain& topFrameDomain, WallTime lastSeen, CompletionHandler<void()>&& completionHandler)
-{
-    ASSERT(RunLoop::isMain());
-
-    postTask([this, targetDomain = targetDomain.isolatedCopy(), topFrameDomain = topFrameDomain.isolatedCopy(), lastSeen, completionHandler = WTFMove(completionHandler)]() mutable {
-        if (m_statisticsStore)
-            m_statisticsStore->logSubresourceLoading(targetDomain, topFrameDomain, lastSeen);
-
-        postTaskReply(WTFMove(completionHandler));
-    });
-}
-
-void WebResourceLoadStatisticsStore::logSubresourceLoading(const SubResourceDomain& targetDomain, const TopFrameDomain& topFrameDomain, WallTime lastSeen, CompletionHandler<void()>&& completionHandler)
-{
-    ASSERT(RunLoop::isMain());
-
-    postTask([this, targetDomain = targetDomain.isolatedCopy(), topFrameDomain = topFrameDomain.isolatedCopy(), lastSeen, completionHandler = WTFMove(completionHandler)]() mutable {
-        if (m_statisticsStore)
-            m_statisticsStore->logSubresourceLoading(targetDomain, topFrameDomain, lastSeen);
-
-        postTaskReply(WTFMove(completionHandler));
-    });
-}
-
-void WebResourceLoadStatisticsStore::logSubresourceRedirect(const RegistrableDomain& sourceDomain, const RegistrableDomain& targetDomain, CompletionHandler<void()>&& completionHandler)
-{
-    ASSERT(RunLoop::isMain());
-
-    postTask([this, sourceDomain = sourceDomain.isolatedCopy(), targetDomain = targetDomain.isolatedCopy(), completionHandler = WTFMove(completionHandler)]() mutable {
-        if (m_statisticsStore)
-            m_statisticsStore->logSubresourceRedirect(sourceDomain, targetDomain);
-        postTaskReply(WTFMove(completionHandler));
-    });
-}
-
 void WebResourceLoadStatisticsStore::logUserInteraction(const RegistrableDomain& domain, CompletionHandler<void()>&& completionHandler)
 {
     ASSERT(RunLoop::isMain());

Modified: trunk/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h (249125 => 249126)


--- trunk/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h	2019-08-27 00:18:57 UTC (rev 249125)
+++ trunk/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h	2019-08-27 00:20:31 UTC (rev 249126)
@@ -118,9 +118,6 @@
     void logFrameNavigation(const WebFrameProxy&, const URL& pageURL, const WebCore::ResourceRequest&, const URL& redirectURL);
     void logFrameNavigation(const NavigatedToDomain&, const TopFrameDomain&, const NavigatedFromDomain&, bool isRedirect, bool isMainFrame);
     void logUserInteraction(const TopFrameDomain&, CompletionHandler<void()>&&);
-    void logWebSocketLoading(const SubResourceDomain&, const TopFrameDomain&, WallTime lastSeen, CompletionHandler<void()>&&);
-    void logSubresourceLoading(const SubResourceDomain&, const TopFrameDomain&, WallTime lastSeen, CompletionHandler<void()>&&);
-    void logSubresourceRedirect(const RedirectedFromDomain&, const RedirectedToDomain&, CompletionHandler<void()>&&);
     void logCrossSiteLoadWithLinkDecoration(const NavigatedFromDomain&, const NavigatedToDomain&, CompletionHandler<void()>&&);
     void clearUserInteraction(const TopFrameDomain&, CompletionHandler<void()>&&);
     void deleteWebsiteDataForRegistrableDomains(OptionSet<WebsiteDataType>, Vector<std::pair<RegistrableDomain, WebsiteDataToRemove>>&&, bool shouldNotifyPage, CompletionHandler<void(const HashSet<RegistrableDomain>&)>&&);

Modified: trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp (249125 => 249126)


--- trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp	2019-08-27 00:18:57 UTC (rev 249125)
+++ trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp	2019-08-27 00:20:31 UTC (rev 249126)
@@ -689,30 +689,6 @@
     }
 }
 
-void NetworkConnectionToWebProcess::logWebSocketLoading(PAL::SessionID sessionID, const RegistrableDomain& targetDomain, const RegistrableDomain& topFrameDomain, WallTime lastSeen)
-{
-    if (auto* networkSession = networkProcess().networkSession(sessionID)) {
-        if (auto* resourceLoadStatistics = networkSession->resourceLoadStatistics())
-            resourceLoadStatistics->logWebSocketLoading(targetDomain, topFrameDomain, lastSeen, [] { });
-    }
-}
-
-void NetworkConnectionToWebProcess::logSubresourceLoading(PAL::SessionID sessionID, const RegistrableDomain& targetDomain, const RegistrableDomain& topFrameDomain, WallTime lastSeen)
-{
-    if (auto* networkSession = networkProcess().networkSession(sessionID)) {
-        if (auto* resourceLoadStatistics = networkSession->resourceLoadStatistics())
-            resourceLoadStatistics->logSubresourceLoading(targetDomain, topFrameDomain, lastSeen, [] { });
-    }
-}
-
-void NetworkConnectionToWebProcess::logSubresourceRedirect(PAL::SessionID sessionID, const RegistrableDomain& sourceDomain, const RegistrableDomain& targetDomain)
-{
-    if (auto* networkSession = networkProcess().networkSession(sessionID)) {
-        if (auto* resourceLoadStatistics = networkSession->resourceLoadStatistics())
-            resourceLoadStatistics->logSubresourceRedirect(sourceDomain, targetDomain, [] { });
-    }
-}
-
 void NetworkConnectionToWebProcess::resourceLoadStatisticsUpdated(ResourceLoadObserver::PerSessionResourceLoadData&& statistics)
 {
     for (auto& iter : statistics) {

Modified: trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h (249125 => 249126)


--- trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h	2019-08-27 00:18:57 UTC (rev 249125)
+++ trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h	2019-08-27 00:20:31 UTC (rev 249126)
@@ -220,9 +220,6 @@
     void clearPageSpecificDataForResourceLoadStatistics(PAL::SessionID, WebCore::PageIdentifier);
 
     void logUserInteraction(PAL::SessionID, const RegistrableDomain&);
-    void logWebSocketLoading(PAL::SessionID, const RegistrableDomain& targetDomain, const RegistrableDomain& topFrameDomain, WallTime lastSeen);
-    void logSubresourceLoading(PAL::SessionID, const RegistrableDomain& targetDomain, const RegistrableDomain& topFrameDomain, WallTime lastSeen);
-    void logSubresourceRedirect(PAL::SessionID, const RegistrableDomain& sourceDomain, const RegistrableDomain& targetDomain);
     void resourceLoadStatisticsUpdated(WebCore::ResourceLoadObserver::PerSessionResourceLoadData&&);
     void hasStorageAccess(PAL::SessionID, const RegistrableDomain& subFrameDomain, const RegistrableDomain& topFrameDomain, WebCore::FrameIdentifier, WebCore::PageIdentifier, CompletionHandler<void(bool)>&&);
     void requestStorageAccess(PAL::SessionID, const RegistrableDomain& subFrameDomain, const RegistrableDomain& topFrameDomain, WebCore::FrameIdentifier, WebCore::PageIdentifier, CompletionHandler<void(WebCore::StorageAccessWasGranted, WebCore::StorageAccessPromptWasShown)>&&);

Modified: trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in (249125 => 249126)


--- trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in	2019-08-27 00:18:57 UTC (rev 249125)
+++ trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in	2019-08-27 00:20:31 UTC (rev 249126)
@@ -61,9 +61,6 @@
     RemoveStorageAccessForFrame(PAL::SessionID sessionID, WebCore::FrameIdentifier frameID, WebCore::PageIdentifier pageID);
     ClearPageSpecificDataForResourceLoadStatistics(PAL::SessionID sessionID, WebCore::PageIdentifier pageID);
     LogUserInteraction(PAL::SessionID sessionID, WebCore::RegistrableDomain domain)
-    LogWebSocketLoading(PAL::SessionID sessionID, WebCore::RegistrableDomain targetDomain, WebCore::RegistrableDomain topFrameDomain, WallTime lastSeen)
-    LogSubresourceLoading(PAL::SessionID sessionID, WebCore::RegistrableDomain targetDomain, WebCore::RegistrableDomain topFrameDomain, WallTime lastSeen)
-    LogSubresourceRedirect(PAL::SessionID sessionID, WebCore::RegistrableDomain sourceDomain, WebCore::RegistrableDomain targetDomain)
     ResourceLoadStatisticsUpdated(Vector<std::pair<PAL::SessionID, Vector<WebCore::ResourceLoadStatistics>>> statistics)
     HasStorageAccess(PAL::SessionID sessionID, WebCore::RegistrableDomain subFrameDomain, WebCore::RegistrableDomain topFrameDomain, WebCore::FrameIdentifier frameID, WebCore::PageIdentifier pageID) -> (bool hasStorageAccess) Async
     RequestStorageAccess(PAL::SessionID sessionID, WebCore::RegistrableDomain subFrameDomain, WebCore::RegistrableDomain topFrameDomain, WebCore::FrameIdentifier frameID, WebCore::PageIdentifier pageID) -> (enum:bool WebCore::StorageAccessWasGranted wasGranted, enum:bool WebCore::StorageAccessPromptWasShown promptWasShown) Async

Modified: trunk/Source/WebKit/WebProcess/WebProcess.cpp (249125 => 249126)


--- trunk/Source/WebKit/WebProcess/WebProcess.cpp	2019-08-27 00:18:57 UTC (rev 249125)
+++ trunk/Source/WebKit/WebProcess/WebProcess.cpp	2019-08-27 00:20:31 UTC (rev 249126)
@@ -224,6 +224,9 @@
     ResourceLoadObserver::shared().setRequestStorageAccessUnderOpenerCallback([this] (PAL::SessionID sessionID, const RegistrableDomain& domainInNeedOfStorageAccess, PageIdentifier openerPageID, const RegistrableDomain& openerDomain) {
         ensureNetworkProcessConnection().connection().send(Messages::NetworkConnectionToWebProcess::RequestStorageAccessUnderOpener(sessionID, domainInNeedOfStorageAccess, openerPageID, openerDomain), 0);
     });
+    
+    ResourceLoadObserver::shared().setLogUserInteractionNotificationCallback([this] (PAL::SessionID sessionID, const RegistrableDomain& domain) {    ensureNetworkProcessConnection().connection().send(Messages::NetworkConnectionToWebProcess::LogUserInteraction(sessionID, domain), 0);
+    });
 #endif
     
     Gigacage::disableDisablingPrimitiveGigacageIfShouldBeEnabled();
@@ -396,24 +399,6 @@
 
     ensureNetworkProcessConnection();
 
-#if ENABLE(RESOURCE_LOAD_STATISTICS)
-    ResourceLoadObserver::shared().setLogUserInteractionNotificationCallback([this] (PAL::SessionID sessionID, const RegistrableDomain& domain) {
-        ensureNetworkProcessConnection().connection().send(Messages::NetworkConnectionToWebProcess::LogUserInteraction(sessionID, domain), 0);
-    });
-
-    ResourceLoadObserver::shared().setLogWebSocketLoadingNotificationCallback([this] (PAL::SessionID sessionID, const RegistrableDomain& targetDomain, const RegistrableDomain& topFrameDomain, WallTime lastSeen) {
-        ensureNetworkProcessConnection().connection().send(Messages::NetworkConnectionToWebProcess::LogWebSocketLoading(sessionID, targetDomain, topFrameDomain, lastSeen), 0);
-    });
-    
-    ResourceLoadObserver::shared().setLogSubresourceLoadingNotificationCallback([this] (PAL::SessionID sessionID, const RegistrableDomain& targetDomain, const RegistrableDomain& topFrameDomain, WallTime lastSeen) {
-        ensureNetworkProcessConnection().connection().send(Messages::NetworkConnectionToWebProcess::LogSubresourceLoading(sessionID, targetDomain, topFrameDomain, lastSeen), 0);
-    });
-
-    ResourceLoadObserver::shared().setLogSubresourceRedirectNotificationCallback([this] (PAL::SessionID sessionID, const RegistrableDomain& sourceDomain, const RegistrableDomain& targetDomain) {
-        ensureNetworkProcessConnection().connection().send(Messages::NetworkConnectionToWebProcess::LogSubresourceRedirect(sessionID, sourceDomain, targetDomain), 0);
-    });
-#endif
-
     setTerminationTimeout(parameters.terminationTimeout);
 
     resetPlugInAutoStartOriginHashes(parameters.plugInAutoStartOriginHashes);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to