Changeset 250424 in webkit
- Timestamp:
- Sep 27, 2019 8:55:01 AM (5 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r250422 r250424 1 2019-09-27 Alex Christensen <achristensen@webkit.org> 2 3 Enable and disable ResourceLoadStatistics only by session 4 https://bugs.webkit.org/show_bug.cgi?id=202298 5 6 Reviewed by Chris Dumez. 7 8 This is needed to keep per-session things per-session and per-process-pool things per-process-pool. 9 This was a strange case where we would take the current session's value and apply it globally. 10 This has no change in behavior because it is globally enabled and disabled by API clients anyways. 11 12 * NetworkProcess/NetworkProcess.cpp: 13 (WebKit::NetworkProcess::setResourceLoadStatisticsEnabled): 14 * NetworkProcess/NetworkProcess.h: 15 * NetworkProcess/NetworkProcess.messages.in: 16 * UIProcess/API/Cocoa/WKWebView.mm: 17 (-[WKWebView _initializeWithConfiguration:]): 18 * UIProcess/WebProcessPool.cpp: 19 (WebKit::WebProcessPool::setResourceLoadStatisticsEnabled): Deleted. 20 * UIProcess/WebProcessPool.h: 21 * UIProcess/WebsiteData/WebsiteDataStore.cpp: 22 (WebKit::WebsiteDataStore::setResourceLoadStatisticsEnabled): 23 1 24 2019-09-27 Alex Christensen <achristensen@webkit.org> 2 25 -
trunk/Source/WebKit/NetworkProcess/NetworkProcess.cpp
r250422 r250424 1151 1151 } 1152 1152 1153 void NetworkProcess::setResourceLoadStatisticsEnabled(bool enabled) 1154 { 1155 forEachNetworkSession([enabled](auto& networkSession) { 1156 networkSession.setResourceLoadStatisticsEnabled(enabled); 1157 }); 1153 void NetworkProcess::setResourceLoadStatisticsEnabled(PAL::SessionID sessionID, bool enabled) 1154 { 1155 if (auto* networkSession = this->networkSession(sessionID)) 1156 networkSession->setResourceLoadStatisticsEnabled(enabled); 1158 1157 } 1159 1158 -
trunk/Source/WebKit/NetworkProcess/NetworkProcess.h
r250422 r250424 247 247 void setIsRunningResourceLoadStatisticsTest(PAL::SessionID, bool value, CompletionHandler<void()>&&); 248 248 void setNotifyPagesWhenTelemetryWasCaptured(PAL::SessionID, bool value, CompletionHandler<void()>&&); 249 void setResourceLoadStatisticsEnabled( bool);249 void setResourceLoadStatisticsEnabled(PAL::SessionID, bool); 250 250 void setResourceLoadStatisticsLogTestingEvent(bool); 251 251 void setResourceLoadStatisticsDebugMode(PAL::SessionID, bool debugMode, CompletionHandler<void()>&&d); -
trunk/Source/WebKit/NetworkProcess/NetworkProcess.messages.in
r250422 r250424 87 87 ClearUserInteraction(PAL::SessionID sessionID, WebCore::RegistrableDomain resourceDomain) -> () Async 88 88 DumpResourceLoadStatistics(PAL::SessionID sessionID) -> (String dumpedStatistics) Async 89 SetResourceLoadStatisticsEnabled( bool enabled)89 SetResourceLoadStatisticsEnabled(PAL::SessionID sessionID, bool enabled) 90 90 SetResourceLoadStatisticsLogTestingEvent(bool enabled) 91 91 UpdatePrevalentDomainsToBlockCookiesFor(PAL::SessionID sessionID, Vector<WebCore::RegistrableDomain> domainsToBlock) -> () Async -
trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm
r250405 r250424 580 580 581 581 WebKit::WebProcessPool& processPool = *[_configuration processPool]->_processPool; 582 processPool.setResourceLoadStatisticsEnabled(configuration.websiteDataStore._resourceLoadStatisticsEnabled);583 582 584 583 auto pageConfiguration = [configuration copyPageConfiguration]; -
trunk/Source/WebKit/UIProcess/WebProcessPool.cpp
r250422 r250424 570 570 SandboxExtension::createHandleForReadWriteDirectory(parameters.defaultDataStoreParameters.networkSessionParameters.resourceLoadStatisticsDirectory, parameters.defaultDataStoreParameters.networkSessionParameters.resourceLoadStatisticsDirectoryExtensionHandle); 571 571 572 bool enableResourceLoadStatistics = m_shouldEnableITPForDefaultSessions;572 bool enableResourceLoadStatistics = false; 573 573 bool enableResourceLoadStatisticsLogTestingEvent = false; 574 574 bool shouldIncludeLocalhost = true; … … 616 616 } 617 617 } else { 618 if (WebsiteDataStore::defaultDataStoreExists()) 619 enableResourceLoadStatistics = WebsiteDataStore::defaultDataStore()->resourceLoadStatisticsEnabled(); 618 620 auto networkCacheDirectory = WebsiteDataStore::defaultNetworkCacheDirectory(); 619 621 parameters.defaultDataStoreParameters.networkSessionParameters.networkCacheDirectory = networkCacheDirectory; … … 1463 1465 m_shouldUseFontSmoothing = useFontSmoothing; 1464 1466 sendToAllProcesses(Messages::WebProcess::SetShouldUseFontSmoothing(useFontSmoothing)); 1465 }1466 1467 void WebProcessPool::setResourceLoadStatisticsEnabled(bool enabled)1468 {1469 m_shouldEnableITPForDefaultSessions = enabled;1470 sendToAllProcesses(Messages::WebProcess::SetResourceLoadStatisticsEnabled(enabled));1471 #if ENABLE(RESOURCE_LOAD_STATISTICS)1472 sendToNetworkingProcess(Messages::NetworkProcess::SetResourceLoadStatisticsEnabled(enabled));1473 #endif1474 1467 } 1475 1468 -
trunk/Source/WebKit/UIProcess/WebProcessPool.h
r250422 r250424 447 447 } 448 448 449 void setResourceLoadStatisticsEnabled(bool);450 449 void clearResourceLoadStatistics(); 451 450 … … 725 724 bool m_shouldMakeNextWebProcessLaunchFailForTesting { false }; 726 725 bool m_shouldMakeNextNetworkProcessLaunchFailForTesting { false }; 727 bool m_shouldEnableITPForDefaultSessions { false };728 726 729 727 UserObservablePageCounter m_userObservablePageCounter; -
trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp
r250413 r250424 1890 1890 resolveDirectoriesIfNecessary(); 1891 1891 1892 for (auto& processPool : processPools(std::numeric_limits<size_t>::max(), false)) { 1893 processPool->setResourceLoadStatisticsEnabled(true); 1894 processPool->sendToNetworkingProcess(Messages::NetworkProcess::SetResourceLoadStatisticsEnabled(true)); 1895 } 1896 return; 1897 } 1898 1899 for (auto& processPool : processPools(std::numeric_limits<size_t>::max(), false)) { 1900 processPool->setResourceLoadStatisticsEnabled(false); 1901 processPool->sendToNetworkingProcess(Messages::NetworkProcess::SetResourceLoadStatisticsEnabled(false)); 1902 } 1892 for (auto& processPool : processPools(std::numeric_limits<size_t>::max(), false)) 1893 processPool->sendToNetworkingProcess(Messages::NetworkProcess::SetResourceLoadStatisticsEnabled(m_sessionID, true)); 1894 return; 1895 } 1896 1897 for (auto& processPool : processPools(std::numeric_limits<size_t>::max(), false)) 1898 processPool->sendToNetworkingProcess(Messages::NetworkProcess::SetResourceLoadStatisticsEnabled(m_sessionID, false)); 1903 1899 1904 1900 m_resourceLoadStatisticsEnabled = false;
Note: See TracChangeset
for help on using the changeset viewer.