Changeset 243671 in webkit
- Timestamp:
- Mar 29, 2019, 6:09:12 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 1 deleted
- 20 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/http/tests/storageAccess/deny-storage-access-under-opener-expected.txt (modified) (1 diff)
-
LayoutTests/http/tests/storageAccess/deny-storage-access-under-opener-if-auto-dismiss-expected.txt (modified) (1 diff)
-
LayoutTests/http/tests/storageAccess/grant-storage-access-under-opener-at-popup-user-gesture-expected.txt (added)
-
LayoutTests/http/tests/storageAccess/grant-storage-access-under-opener-at-popup-user-gesture.html (added)
-
LayoutTests/http/tests/storageAccess/resources/get-cookies.php (modified) (1 diff)
-
LayoutTests/http/tests/storageAccess/resources/produce-user-gesture-set-cookie-and-report-back.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/loader/ResourceLoadObserver.cpp (modified) (12 diffs)
-
Source/WebCore/loader/ResourceLoadObserver.h (modified) (4 diffs)
-
Source/WebCore/testing/Internals.cpp (modified) (1 diff)
-
Source/WebKit/CMakeLists.txt (modified) (1 diff)
-
Source/WebKit/ChangeLog (modified) (1 diff)
-
Source/WebKit/DerivedSources.make (modified) (1 diff)
-
Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp (modified) (2 diffs)
-
Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h (modified) (4 diffs)
-
Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp (modified) (3 diffs)
-
Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h (modified) (1 diff)
-
Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in (modified) (1 diff)
-
Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.messages.in (deleted)
-
Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp (modified) (1 diff)
-
Source/WebKit/WebKit.xcodeproj/project.pbxproj (modified) (7 diffs)
-
Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundle.cpp (modified) (1 diff)
-
Source/WebKit/WebProcess/WebProcess.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r243669 r243671 1 2019-03-29 John Wilander <wilander@apple.com> 2 3 Move WebResourceLoadStatisticsStore IPC calls from the UI process to the network process 4 https://bugs.webkit.org/show_bug.cgi?id=196407 5 <rdar://problem/47859936> 6 7 Reviewed by Brent Fulgham. 8 9 * http/tests/storageAccess/deny-storage-access-under-opener-expected.txt: 10 * http/tests/storageAccess/deny-storage-access-under-opener-if-auto-dismiss-expected.txt: 11 * http/tests/storageAccess/grant-storage-access-under-opener-at-popup-user-gesture-expected.txt: Added. 12 * http/tests/storageAccess/grant-storage-access-under-opener-at-popup-user-gesture.html: Added. 13 * http/tests/storageAccess/resources/get-cookies.php: 14 * http/tests/storageAccess/resources/produce-user-gesture-set-cookie-and-report-back.html: Added. 15 1 16 2019-03-29 Chris Dumez <cdumez@apple.com> 2 17 -
trunk/LayoutTests/http/tests/storageAccess/deny-storage-access-under-opener-expected.txt
r231450 r243671 15 15 Should not receive first-party cookie. 16 16 Did not receive cookie named 'firstPartyCookie'. 17 Did not receive cookie named ''.18 17 Client-side document.cookie: -
trunk/LayoutTests/http/tests/storageAccess/deny-storage-access-under-opener-if-auto-dismiss-expected.txt
r236563 r243671 15 15 Should not receive first-party cookie. 16 16 Did not receive cookie named 'firstPartyCookie'. 17 Did not receive cookie named ''.18 17 Client-side document.cookie: -
trunk/LayoutTests/http/tests/storageAccess/resources/get-cookies.php
r235569 r243671 6 6 echo "Received cookie named '" . $_GET["name1"] . "'.<br>"; 7 7 } 8 if(!isset($_COOKIE[$_GET["name2"]])) { 9 echo "Did not receive cookie named '" . $_GET["name2"] . "'.<br>"; 10 } else { 11 echo "Received cookie named '" . $_GET["name2"] . "'.<br>"; 8 if(!empty($_GET["name2"])) { 9 if(!isset($_COOKIE[$_GET["name2"]])) { 10 echo "Did not receive cookie named '" . $_GET["name2"] . "'.<br>"; 11 } else { 12 echo "Received cookie named '" . $_GET["name2"] . "'.<br>"; 13 } 12 14 } 13 15 if(!empty($_GET["name3"])) { -
trunk/Source/WebCore/ChangeLog
r243669 r243671 1 2019-03-29 John Wilander <wilander@apple.com> 2 3 Move WebResourceLoadStatisticsStore IPC calls from the UI process to the network process 4 https://bugs.webkit.org/show_bug.cgi?id=196407 5 <rdar://problem/47859936> 6 7 Reviewed by Brent Fulgham. 8 9 Test: http/tests/storageAccess/grant-storage-access-under-opener-at-popup-user-gesture.html 10 11 This patch removes old code for the batching into "statistics updated" calls. 12 Since the move of Resource Load Statistics to the network process, all such 13 collection is done directly through dedicated calls to the network process. 14 15 The remaining functionality was renamed to make it more clear, i.e. 16 ResourceLoadObserver::notifyObserver() renamed to 17 ResourceLoadObserver::updateCentralStatisticsStore(). 18 19 * loader/ResourceLoadObserver.cpp: 20 (WebCore::ResourceLoadObserver::setStatisticsUpdatedCallback): 21 (WebCore::ResourceLoadObserver::setRequestStorageAccessUnderOpenerCallback): 22 (WebCore::ResourceLoadObserver::logSubresourceLoading): 23 (WebCore::ResourceLoadObserver::logWebSocketLoading): 24 (WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution): 25 (WebCore::ResourceLoadObserver::requestStorageAccessUnderOpener): 26 (WebCore::ResourceLoadObserver::updateCentralStatisticsStore): 27 (WebCore::ResourceLoadObserver::clearState): 28 (WebCore::ResourceLoadObserver::setNotificationCallback): Deleted. 29 (WebCore::ResourceLoadObserver::ResourceLoadObserver): Deleted. 30 (WebCore::ResourceLoadObserver::scheduleNotificationIfNeeded): Deleted. 31 (WebCore::ResourceLoadObserver::notifyObserver): Deleted. 32 * loader/ResourceLoadObserver.h: 33 * testing/Internals.cpp: 34 (WebCore::Internals::notifyResourceLoadObserver): 35 1 36 2019-03-29 Chris Dumez <cdumez@apple.com> 2 37 -
trunk/Source/WebCore/loader/ResourceLoadObserver.cpp
r242155 r243671 54 54 } 55 55 56 void ResourceLoadObserver::set NotificationCallback(WTF::Function<void(Vector<ResourceLoadStatistics>&&)>&& notificationCallback)56 void ResourceLoadObserver::setStatisticsUpdatedCallback(WTF::Function<void(Vector<ResourceLoadStatistics>&&)>&& notificationCallback) 57 57 { 58 58 ASSERT(!m_notificationCallback); … … 60 60 } 61 61 62 void ResourceLoadObserver::setRequestStorageAccessUnderOpenerCallback(WTF::Function<void( const RegistrableDomain& domainInNeedOfStorageAccess, uint64_t openerPageID, const RegistrableDomain& openerDomain)>&& callback)62 void ResourceLoadObserver::setRequestStorageAccessUnderOpenerCallback(WTF::Function<void(PAL::SessionID sessionID, const RegistrableDomain& domainInNeedOfStorageAccess, uint64_t openerPageID, const RegistrableDomain& openerDomain)>&& callback) 63 63 { 64 64 ASSERT(!m_requestStorageAccessUnderOpenerCallback); … … 90 90 } 91 91 92 ResourceLoadObserver::ResourceLoadObserver()93 : m_notificationTimer(*this, &ResourceLoadObserver::notifyObserver)94 {95 }96 97 92 static inline bool is3xxRedirect(const ResourceResponse& response) 98 93 { … … 134 129 return; 135 130 136 bool shouldCallNotificationCallback = false;137 131 { 138 132 auto& targetStatistics = ensureResourceStatisticsForRegistrableDomain(targetDomain); 139 133 auto lastSeen = ResourceLoadStatistics::reduceTimeResolution(WallTime::now()); 140 134 targetStatistics.lastSeen = lastSeen; 141 if (targetStatistics.subresourceUnderTopFrameDomains.add(topFrameDomain).isNewEntry) 142 shouldCallNotificationCallback = true; 135 targetStatistics.subresourceUnderTopFrameDomains.add(topFrameDomain); 143 136 144 137 m_logSubresourceLoadingNotificationCallback(page->sessionID(), targetDomain, topFrameDomain, lastSeen); … … 147 140 if (isRedirect) { 148 141 auto& redirectingOriginStatistics = ensureResourceStatisticsForRegistrableDomain(redirectedFromDomain); 149 bool isNewRedirectToEntry = redirectingOriginStatistics.subresourceUniqueRedirectsTo.add(targetDomain).isNewEntry;142 redirectingOriginStatistics.subresourceUniqueRedirectsTo.add(targetDomain); 150 143 auto& targetStatistics = ensureResourceStatisticsForRegistrableDomain(targetDomain); 151 bool isNewRedirectFromEntry = targetStatistics.subresourceUniqueRedirectsFrom.add(redirectedFromDomain).isNewEntry; 152 153 if (isNewRedirectToEntry || isNewRedirectFromEntry) 154 shouldCallNotificationCallback = true; 144 targetStatistics.subresourceUniqueRedirectsFrom.add(redirectedFromDomain); 155 145 156 146 m_logSubresourceRedirectNotificationCallback(page->sessionID(), redirectedFromDomain, targetDomain); 157 147 } 158 159 if (shouldCallNotificationCallback)160 scheduleNotificationIfNeeded();161 148 } 162 149 … … 182 169 auto& targetStatistics = ensureResourceStatisticsForRegistrableDomain(targetDomain); 183 170 targetStatistics.lastSeen = lastSeen; 184 if (targetStatistics.subresourceUnderTopFrameDomains.add(topFrameDomain).isNewEntry) 185 scheduleNotificationIfNeeded(); 171 targetStatistics.subresourceUnderTopFrameDomains.add(topFrameDomain); 186 172 187 173 m_logWebSocketLoadingNotificationCallback(sessionID, targetDomain, topFrameDomain, lastSeen); … … 216 202 if (auto* openerFrame = openerDocument->frame()) { 217 203 if (auto openerPageID = openerFrame->loader().client().pageID()) 218 requestStorageAccessUnderOpener( topFrameDomain, openerPageID.value(), *openerDocument);204 requestStorageAccessUnderOpener(document.sessionID(), topFrameDomain, openerPageID.value(), *openerDocument); 219 205 } 220 206 } … … 224 210 m_logUserInteractionNotificationCallback(document.sessionID(), topFrameDomain); 225 211 #endif 226 227 m_notificationTimer.stop();228 notifyObserver();229 212 230 213 #if ENABLE(RESOURCE_LOAD_STATISTICS) && !RELEASE_LOG_DISABLED … … 251 234 252 235 #if ENABLE(RESOURCE_LOAD_STATISTICS) 253 void ResourceLoadObserver::requestStorageAccessUnderOpener( const RegistrableDomain& domainInNeedOfStorageAccess, uint64_t openerPageID, Document& openerDocument)236 void ResourceLoadObserver::requestStorageAccessUnderOpener(PAL::SessionID sessionID, const RegistrableDomain& domainInNeedOfStorageAccess, uint64_t openerPageID, Document& openerDocument) 254 237 { 255 238 auto openerUrl = openerDocument.url(); … … 258 241 && !openerDocument.hasRequestedPageSpecificStorageAccessWithUserInteraction(domainInNeedOfStorageAccess) 259 242 && !equalIgnoringASCIICase(openerUrl.string(), WTF::blankURL())) { 260 m_requestStorageAccessUnderOpenerCallback( domainInNeedOfStorageAccess, openerPageID, openerDomain);243 m_requestStorageAccessUnderOpenerCallback(sessionID, domainInNeedOfStorageAccess, openerPageID, openerDomain); 261 244 // Remember user interaction-based requests since they don't need to be repeated. 262 245 openerDocument.setHasRequestedPageSpecificStorageAccessWithUserInteraction(domainInNeedOfStorageAccess); … … 383 366 } 384 367 385 void ResourceLoadObserver::scheduleNotificationIfNeeded() 386 { 387 ASSERT(m_notificationCallback); 388 if (m_resourceStatisticsMap.isEmpty()) { 389 m_notificationTimer.stop(); 390 return; 391 } 392 393 if (!m_notificationTimer.isActive()) 394 m_notificationTimer.startOneShot(minimumNotificationInterval); 395 } 396 397 void ResourceLoadObserver::notifyObserver() 398 { 399 ASSERT(m_notificationCallback); 400 m_notificationTimer.stop(); 368 void ResourceLoadObserver::updateCentralStatisticsStore() 369 { 401 370 m_notificationCallback(takeStatistics()); 402 371 } … … 425 394 void ResourceLoadObserver::clearState() 426 395 { 427 m_notificationTimer.stop();428 396 m_resourceStatisticsMap.clear(); 429 397 m_lastReportedUserInteractionMap.clear(); -
trunk/Source/WebCore/loader/ResourceLoadObserver.h
r242155 r243671 73 73 WEBCORE_EXPORT String statisticsForURL(const URL&); 74 74 75 WEBCORE_EXPORT void set NotificationCallback(WTF::Function<void(Vector<ResourceLoadStatistics>&&)>&&);76 WEBCORE_EXPORT void setRequestStorageAccessUnderOpenerCallback(Function<void( const RegistrableDomain&, uint64_t, const RegistrableDomain&)>&&);75 WEBCORE_EXPORT void setStatisticsUpdatedCallback(WTF::Function<void(Vector<ResourceLoadStatistics>&&)>&&); 76 WEBCORE_EXPORT void setRequestStorageAccessUnderOpenerCallback(Function<void(PAL::SessionID, const RegistrableDomain&, uint64_t, const RegistrableDomain&)>&&); 77 77 WEBCORE_EXPORT void setLogUserInteractionNotificationCallback(Function<void(PAL::SessionID, const RegistrableDomain&)>&&); 78 78 WEBCORE_EXPORT void setLogWebSocketLoadingNotificationCallback(Function<void(PAL::SessionID, const RegistrableDomain&, const RegistrableDomain&, WallTime)>&&); … … 80 80 WEBCORE_EXPORT void setLogSubresourceRedirectNotificationCallback(Function<void(PAL::SessionID, const RegistrableDomain&, const RegistrableDomain&)>&&); 81 81 82 WEBCORE_EXPORT void notifyObserver();82 WEBCORE_EXPORT void updateCentralStatisticsStore(); 83 83 WEBCORE_EXPORT void clearState(); 84 84 … … 89 89 90 90 private: 91 ResourceLoadObserver();92 93 91 bool shouldLog(bool usesEphemeralSession) const; 94 92 ResourceLoadStatistics& ensureResourceStatisticsForRegistrableDomain(const RegistrableDomain&); 95 93 96 void scheduleNotificationIfNeeded();97 94 Vector<ResourceLoadStatistics> takeStatistics(); 98 95 99 96 #if ENABLE(RESOURCE_LOAD_STATISTICS) 100 void requestStorageAccessUnderOpener( const RegistrableDomain& domainInNeedOfStorageAccess, uint64_t openerPageID, Document& openerDocument);97 void requestStorageAccessUnderOpener(PAL::SessionID, const RegistrableDomain& domainInNeedOfStorageAccess, uint64_t openerPageID, Document& openerDocument); 101 98 #endif 102 99 … … 104 101 HashMap<RegistrableDomain, WTF::WallTime> m_lastReportedUserInteractionMap; 105 102 Function<void(Vector<ResourceLoadStatistics>&&)> m_notificationCallback; 106 Function<void( const RegistrableDomain&, uint64_t, const RegistrableDomain&)> m_requestStorageAccessUnderOpenerCallback;103 Function<void(PAL::SessionID, const RegistrableDomain&, uint64_t, const RegistrableDomain&)> m_requestStorageAccessUnderOpenerCallback; 107 104 Function<void(PAL::SessionID, const RegistrableDomain&)> m_logUserInteractionNotificationCallback; 108 105 Function<void(PAL::SessionID, const RegistrableDomain&, const RegistrableDomain&, WallTime)> m_logWebSocketLoadingNotificationCallback; 109 106 Function<void(PAL::SessionID, const RegistrableDomain&, const RegistrableDomain&, WallTime)> m_logSubresourceLoadingNotificationCallback; 110 107 Function<void(PAL::SessionID, const RegistrableDomain&, const RegistrableDomain&)> m_logSubresourceRedirectNotificationCallback; 111 112 Timer m_notificationTimer;113 108 #if ENABLE(RESOURCE_LOAD_STATISTICS) && !RELEASE_LOG_DISABLED 114 109 uint64_t m_loggingCounter { 0 }; -
trunk/Source/WebCore/testing/Internals.cpp
r243482 r243671 4917 4917 void Internals::notifyResourceLoadObserver() 4918 4918 { 4919 ResourceLoadObserver::shared(). notifyObserver();4919 ResourceLoadObserver::shared().updateCentralStatisticsStore(); 4920 4920 } 4921 4921 -
trunk/Source/WebKit/CMakeLists.txt
r242503 r243671 145 145 UIProcess/WebProcessPool.messages.in 146 146 UIProcess/WebProcessProxy.messages.in 147 UIProcess/WebResourceLoadStatisticsStore.messages.in148 147 149 148 UIProcess/Automation/WebAutomationSession.messages.in -
trunk/Source/WebKit/ChangeLog
r243666 r243671 1 2019-03-29 John Wilander <wilander@apple.com> 2 3 Move WebResourceLoadStatisticsStore IPC calls from the UI process to the network process 4 https://bugs.webkit.org/show_bug.cgi?id=196407 5 <rdar://problem/47859936> 6 7 Reviewed by Brent Fulgham. 8 9 The two WebResourceLoadStatisticsStore IPC endpoints were left behind when we 10 moved Resource Load Statistics from the UI process to the network process. One 11 of the endpoints is the message RequestStorageAccessUnderOpener which underpins 12 our compatibility fix for federated logins using popups. This patch redirects 13 these IPC calls to the network process and cleans up some assumptions around 14 them. 15 16 * CMakeLists.txt: 17 Removed the old IPC receiver. 18 * DerivedSources.make: 19 Removed the old IPC receiver. 20 * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp: 21 (WebKit::WebResourceLoadStatisticsStore::requestUpdate): Deleted. 22 This is no longer needed since there is a dedicated update mechanism 23 that actually sends the update. 24 * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h: 25 * NetworkProcess/NetworkConnectionToWebProcess.cpp: 26 (WebKit::NetworkConnectionToWebProcess::resourceLoadStatisticsUpdated): 27 (WebKit::NetworkConnectionToWebProcess::requestStorageAccessUnderOpener): 28 Two new IPC receivers to pipe the calls to the network process. 29 (WebKit::NetworkConnectionToWebProcess::requestResourceLoadStatisticsUpdate): Deleted. 30 NetworkConnectionToWebProcess::resourceLoadStatisticsUpdated now serves 31 this purpose. 32 * NetworkProcess/NetworkConnectionToWebProcess.h: 33 * NetworkProcess/NetworkConnectionToWebProcess.messages.in: 34 * UIProcess/WebResourceLoadStatisticsStore.messages.in: Removed. 35 Removed the old IPC receiver. 36 * UIProcess/WebsiteData/WebsiteDataStore.cpp: 37 * WebKit.xcodeproj/project.pbxproj: 38 * WebProcess/InjectedBundle/API/c/WKBundle.cpp: 39 (WKBundleResourceLoadStatisticsNotifyObserver): 40 Function name update. 41 * WebProcess/WebProcess.cpp: 42 Now calls IPC to the network process instead of the UI process. 43 1 44 2019-03-29 Myles C. Maxfield <mmaxfield@apple.com> 2 45 -
trunk/Source/WebKit/DerivedSources.make
r243195 r243671 179 179 WebRTCResolver \ 180 180 WebRTCSocket \ 181 WebResourceLoadStatisticsStore \182 181 WebResourceLoader \ 183 182 WebSWClientConnection \ -
trunk/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp
r243181 r243671 43 43 #include "WebProcessPool.h" 44 44 #include "WebProcessProxy.h" 45 #include "WebResourceLoadStatisticsStoreMessages.h"46 45 #include "WebResourceLoadStatisticsTelemetry.h" 47 46 #include "WebsiteDataFetchOption.h" … … 252 251 } 253 252 254 void WebResourceLoadStatisticsStore::requestUpdate()255 {256 resourceLoadStatisticsUpdated({ });257 }258 259 253 void WebResourceLoadStatisticsStore::resourceLoadStatisticsUpdated(Vector<WebCore::ResourceLoadStatistics>&& origins) 260 254 { -
trunk/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h
r243181 r243671 67 67 }; 68 68 69 class WebResourceLoadStatisticsStore final : public ThreadSafeRefCounted<WebResourceLoadStatisticsStore, WTF::DestructionThread::Main> , public IPC::MessageReceiver{69 class WebResourceLoadStatisticsStore final : public ThreadSafeRefCounted<WebResourceLoadStatisticsStore, WTF::DestructionThread::Main> { 70 70 public: 71 71 using ResourceLoadStatistics = WebCore::ResourceLoadStatistics; … … 121 121 void requestStorageAccess(const SubFrameDomain&, const TopFrameDomain&, Optional<FrameID>, PageID, CompletionHandler<void(StorageAccessStatus)>&&); 122 122 void requestStorageAccessGranted(const SubFrameDomain&, const TopFrameDomain&, FrameID, PageID, CompletionHandler<void(bool)>&&); 123 void requestUpdate();124 123 void setLastSeen(const RegistrableDomain&, Seconds, CompletionHandler<void()>&&); 125 124 void setPrevalentResource(const RegistrableDomain&, CompletionHandler<void()>&&); … … 179 178 void notifyPageStatisticsTelemetryFinished(unsigned totalPrevalentResources, unsigned totalPrevalentResourcesWithUserInteraction, unsigned top3SubframeUnderTopFrameOrigins) const; 180 179 180 void resourceLoadStatisticsUpdated(Vector<ResourceLoadStatistics>&&); 181 void requestStorageAccessUnderOpener(DomainInNeedOfStorageAccess&&, uint64_t openerPageID, OpenerDomain&&); 182 181 183 private: 182 184 explicit WebResourceLoadStatisticsStore(NetworkSession&, const String&, ShouldIncludeLocalhost); … … 184 186 void postTask(WTF::Function<void()>&&); 185 187 static void postTaskReply(WTF::Function<void()>&&); 186 187 // IPC::MessageReceiver.188 void didReceiveMessage(IPC::Connection&, IPC::Decoder&) override;189 190 // IPC message handlers.191 void resourceLoadStatisticsUpdated(Vector<ResourceLoadStatistics>&& origins);192 void requestStorageAccessUnderOpener(DomainInNeedOfStorageAccess&&, uint64_t openerPageID, OpenerDomain&&);193 188 194 189 void performDailyTasks(); -
trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp
r243258 r243671 654 654 } 655 655 656 void NetworkConnectionToWebProcess::re questResourceLoadStatisticsUpdate()656 void NetworkConnectionToWebProcess::resourceLoadStatisticsUpdated(Vector<WebCore::ResourceLoadStatistics>&& statistics) 657 657 { 658 658 for (auto& networkSession : networkProcess().networkSessions().values()) { … … 661 661 662 662 if (auto* resourceLoadStatistics = networkSession->resourceLoadStatistics()) 663 resourceLoadStatistics->re questUpdate();663 resourceLoadStatistics->resourceLoadStatisticsUpdated(WTFMove(statistics)); 664 664 } 665 665 } … … 673 673 { 674 674 networkProcess().requestStorageAccessGranted(sessionID, subFrameDomain, topFrameDomain, frameID, pageID, WTFMove(completionHandler)); 675 } 676 677 void NetworkConnectionToWebProcess::requestStorageAccessUnderOpener(PAL::SessionID sessionID, WebCore::RegistrableDomain&& domainInNeedOfStorageAccess, uint64_t openerPageID, WebCore::RegistrableDomain&& openerDomain) 678 { 679 if (auto networkSession = networkProcess().networkSession(sessionID)) { 680 if (auto* resourceLoadStatistics = networkSession->resourceLoadStatistics()) 681 resourceLoadStatistics->requestStorageAccessUnderOpener(WTFMove(domainInNeedOfStorageAccess), openerPageID, WTFMove(openerDomain)); 682 } 675 683 } 676 684 #endif -
trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h
r243258 r243671 219 219 void logSubresourceLoading(PAL::SessionID, const RegistrableDomain& targetDomain, const RegistrableDomain& topFrameDomain, WallTime lastSeen); 220 220 void logSubresourceRedirect(PAL::SessionID, const RegistrableDomain& sourceDomain, const RegistrableDomain& targetDomain); 221 void re questResourceLoadStatisticsUpdate();221 void resourceLoadStatisticsUpdated(Vector<WebCore::ResourceLoadStatistics>&&); 222 222 void hasStorageAccess(PAL::SessionID, const RegistrableDomain& subFrameDomain, const RegistrableDomain& topFrameDomain, uint64_t frameID, uint64_t pageID, CompletionHandler<void(bool)>&&); 223 223 void requestStorageAccess(PAL::SessionID, const RegistrableDomain& subFrameDomain, const RegistrableDomain& topFrameDomain, uint64_t frameID, uint64_t pageID, CompletionHandler<void(bool)>&&); 224 void requestStorageAccessUnderOpener(PAL::SessionID, WebCore::RegistrableDomain&& domainInNeedOfStorageAccess, uint64_t openerPageID, WebCore::RegistrableDomain&& openerDomain); 224 225 #endif 225 226 -
trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in
r243345 r243671 63 63 LogSubresourceLoading(PAL::SessionID sessionID, WebCore::RegistrableDomain targetDomain, WebCore::RegistrableDomain topFrameDomain, WallTime lastSeen) 64 64 LogSubresourceRedirect(PAL::SessionID sessionID, WebCore::RegistrableDomain sourceDomain, WebCore::RegistrableDomain targetDomain) 65 Re questResourceLoadStatisticsUpdate();65 ResourceLoadStatisticsUpdated(Vector<WebCore::ResourceLoadStatistics> statistics) 66 66 HasStorageAccess(PAL::SessionID sessionID, WebCore::RegistrableDomain subFrameDomain, WebCore::RegistrableDomain topFrameDomain, uint64_t frameID, uint64_t pageID) -> (bool hasStorageAccess) Async 67 67 RequestStorageAccess(PAL::SessionID sessionID, WebCore::RegistrableDomain subFrameDomain, WebCore::RegistrableDomain topFrameDomain, uint64_t frameID, uint64_t pageID) -> (bool accessGranted) Async 68 RequestStorageAccessUnderOpener(PAL::SessionID sessionID, WebCore::RegistrableDomain domainInNeedOfStorageAccess, uint64_t openerPageID, WebCore::RegistrableDomain openerDomain) 68 69 #endif 69 70 -
trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp
r243632 r243671 41 41 #include "WebProcessPool.h" 42 42 #include "WebResourceLoadStatisticsStore.h" 43 #include "WebResourceLoadStatisticsStoreMessages.h"44 43 #include "WebsiteData.h" 45 44 #include "WebsiteDataStoreClient.h" -
trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj
r243567 r243671 1123 1123 7A78FF32224191960096483E /* WKStorageAccessAlert.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A78FF2E224191750096483E /* WKStorageAccessAlert.h */; }; 1124 1124 7A78FF332241919B0096483E /* WKStorageAccessAlert.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7A78FF2F224191760096483E /* WKStorageAccessAlert.mm */; }; 1125 7A791EFA1C7CFCF100C4C52B /* WebResourceLoadStatisticsStoreMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7A791EF91C7CFB3700C4C52B /* WebResourceLoadStatisticsStoreMessageReceiver.cpp */; };1126 7A791EFB1C7CFD0100C4C52B /* WebResourceLoadStatisticsStoreMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A791EF81C7CFB1000C4C52B /* WebResourceLoadStatisticsStoreMessages.h */; };1127 1125 7A821F4C1E2F673900604577 /* LegacyCustomProtocolManagerClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A821F4B1E2F664800604577 /* LegacyCustomProtocolManagerClient.h */; }; 1128 1126 7A821F501E2F7A7500604577 /* APICustomProtocolManagerClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A821F4F1E2F7A5C00604577 /* APICustomProtocolManagerClient.h */; }; … … 3581 3579 7A78FF2E224191750096483E /* WKStorageAccessAlert.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKStorageAccessAlert.h; sourceTree = "<group>"; }; 3582 3580 7A78FF2F224191760096483E /* WKStorageAccessAlert.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKStorageAccessAlert.mm; sourceTree = "<group>"; }; 3583 7A791EF81C7CFB1000C4C52B /* WebResourceLoadStatisticsStoreMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebResourceLoadStatisticsStoreMessages.h; path = DerivedSources/WebKit2/WebResourceLoadStatisticsStoreMessages.h; sourceTree = BUILT_PRODUCTS_DIR; };3584 7A791EF91C7CFB3700C4C52B /* WebResourceLoadStatisticsStoreMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebResourceLoadStatisticsStoreMessageReceiver.cpp; path = DerivedSources/WebKit2/WebResourceLoadStatisticsStoreMessageReceiver.cpp; sourceTree = BUILT_PRODUCTS_DIR; };3585 3581 7A821F491E2F65DD00604577 /* LegacyCustomProtocolManagerProxy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LegacyCustomProtocolManagerProxy.cpp; path = CustomProtocols/LegacyCustomProtocolManagerProxy.cpp; sourceTree = "<group>"; }; 3586 3582 7A821F4B1E2F664800604577 /* LegacyCustomProtocolManagerClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LegacyCustomProtocolManagerClient.h; sourceTree = "<group>"; }; … … 3591 3587 7A8A9D591EF13020009801AE /* APIInjectedBundleBundleClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APIInjectedBundleBundleClient.h; sourceTree = "<group>"; }; 3592 3588 7A8A9D5B1EF1458E009801AE /* APIInjectedBundlePageResourceLoadClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APIInjectedBundlePageResourceLoadClient.h; sourceTree = "<group>"; }; 3593 7A9CD8C21C779AD600D9F6C7 /* WebResourceLoadStatisticsStore.messages.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WebResourceLoadStatisticsStore.messages.in; sourceTree = "<group>"; };3594 3589 7AB6EA441EEAAE2300037B2B /* APIIconDatabaseClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APIIconDatabaseClient.h; sourceTree = "<group>"; }; 3595 3590 7AB6EA461EEAB6B000037B2B /* APIGeolocationProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APIGeolocationProvider.h; sourceTree = "<group>"; }; … … 7601 7596 BC032DCF10F4389F0058C15A /* WebProcessProxy.h */, 7602 7597 BCEE7AB312817095009827DA /* WebProcessProxy.messages.in */, 7603 7A9CD8C21C779AD600D9F6C7 /* WebResourceLoadStatisticsStore.messages.in */,7604 7598 51D124241E6D3CC3002B2820 /* WebURLSchemeHandler.cpp */, 7605 7599 51D124251E6D3CC3002B2820 /* WebURLSchemeHandler.h */, … … 8654 8648 51F060DD1654317500F3281B /* WebResourceLoaderMessageReceiver.cpp */, 8655 8649 51F060DE1654317500F3281B /* WebResourceLoaderMessages.h */, 8656 7A791EF91C7CFB3700C4C52B /* WebResourceLoadStatisticsStoreMessageReceiver.cpp */,8657 7A791EF81C7CFB1000C4C52B /* WebResourceLoadStatisticsStoreMessages.h */,8658 8650 51F060DD1654317500F3281F /* WebRTCMonitorMessageReceiver.cpp */, 8659 8651 51F060DD1654317500F3282C /* WebRTCResolverMessageReceiver.cpp */, … … 9672 9664 51F060E01654317F00F3281B /* WebResourceLoaderMessages.h in Headers */, 9673 9665 7AFBD36321E50F39005DBACB /* WebResourceLoadStatisticsStore.h in Headers */, 9674 7A791EFB1C7CFD0100C4C52B /* WebResourceLoadStatisticsStoreMessages.h in Headers */,9675 9666 413075B01DE85F580039EC69 /* WebRTCMonitor.h in Headers */, 9676 9667 41FAF5F51E3C0649001AE678 /* WebRTCResolver.h in Headers */, … … 11183 11174 BCEE7AD012817988009827DA /* WebProcessProxyMessageReceiver.cpp in Sources */, 11184 11175 51F060E11654318500F3281B /* WebResourceLoaderMessageReceiver.cpp in Sources */, 11185 7A791EFA1C7CFCF100C4C52B /* WebResourceLoadStatisticsStoreMessageReceiver.cpp in Sources */,11186 11176 51F060E11654318500F3281F /* WebRTCMonitorMessageReceiver.cpp in Sources */, 11187 11177 51F060E11654318500F3282C /* WebRTCResolverMessageReceiver.cpp in Sources */, -
trunk/Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundle.cpp
r242339 r243671 324 324 void WKBundleResourceLoadStatisticsNotifyObserver(WKBundleRef) 325 325 { 326 WebCore::ResourceLoadObserver::shared(). notifyObserver();326 WebCore::ResourceLoadObserver::shared().updateCentralStatisticsStore(); 327 327 } 328 328 -
trunk/Source/WebKit/WebProcess/WebProcess.cpp
r243388 r243671 66 66 #include "WebProcessPoolMessages.h" 67 67 #include "WebProcessProxyMessages.h" 68 #include "WebResourceLoadStatisticsStoreMessages.h"69 68 #include "WebSWContextManagerConnection.h" 70 69 #include "WebSWContextManagerConnectionMessages.h" … … 212 211 213 212 #if ENABLE(RESOURCE_LOAD_STATISTICS) 214 ResourceLoadObserver::shared().setNotificationCallback([this] (Vector<ResourceLoadStatistics>&& statistics) { 215 parentProcessConnection()->send(Messages::WebResourceLoadStatisticsStore::ResourceLoadStatisticsUpdated(WTFMove(statistics)), 0); 216 217 ensureNetworkProcessConnection().connection().send(Messages::NetworkConnectionToWebProcess::RequestResourceLoadStatisticsUpdate(), 0); 213 ResourceLoadObserver::shared().setStatisticsUpdatedCallback([this] (Vector<ResourceLoadStatistics>&& statistics) { 214 ensureNetworkProcessConnection().connection().send(Messages::NetworkConnectionToWebProcess::ResourceLoadStatisticsUpdated(WTFMove(statistics)), 0); 218 215 }); 219 216 220 ResourceLoadObserver::shared().setRequestStorageAccessUnderOpenerCallback([this] ( const RegistrableDomain& domainInNeedOfStorageAccess, uint64_t openerPageID, const RegistrableDomain& openerDomain) {221 parentProcessConnection()->send(Messages::WebResourceLoadStatisticsStore::RequestStorageAccessUnderOpener(domainInNeedOfStorageAccess, openerPageID, openerDomain), 0);217 ResourceLoadObserver::shared().setRequestStorageAccessUnderOpenerCallback([this] (PAL::SessionID sessionID, const RegistrableDomain& domainInNeedOfStorageAccess, uint64_t openerPageID, const RegistrableDomain& openerDomain) { 218 ensureNetworkProcessConnection().connection().send(Messages::NetworkConnectionToWebProcess::RequestStorageAccessUnderOpener(sessionID, domainInNeedOfStorageAccess, openerPageID, openerDomain), 0); 222 219 }); 223 220 #endif
Note:
See TracChangeset
for help on using the changeset viewer.