Changeset 267091 in webkit
- Timestamp:
- Sep 15, 2020, 11:25:08 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r267090 r267091 1 2020-09-15 Alex Christensen <achristensen@webkit.org> 2 3 Move WKContextClearCachedCredentials SPI to WKWebsiteDataStoreClearCachedCredentials 4 https://bugs.webkit.org/show_bug.cgi?id=216513 5 6 Reviewed by Chris Dumez. 7 8 The credentials are owned by session anyways. 9 This is needed for https://bugs.webkit.org/show_bug.cgi?id=216041 10 11 * NetworkProcess/NetworkProcess.cpp: 12 (WebKit::NetworkProcess::clearCachedCredentials): 13 * NetworkProcess/NetworkProcess.h: 14 * NetworkProcess/NetworkProcess.messages.in: 15 * UIProcess/API/C/WKContext.cpp: 16 (WKContextClearCachedCredentials): Deleted. 17 * UIProcess/API/C/WKContextPrivate.h: 18 * UIProcess/API/C/WKWebsiteDataStoreRef.cpp: 19 (WKWebsiteDataStoreClearCachedCredentials): 20 * UIProcess/API/C/WKWebsiteDataStoreRef.h: 21 * UIProcess/WebProcessPool.cpp: 22 (WebKit::WebProcessPool::clearCachedCredentials): 23 * UIProcess/WebProcessPool.h: 24 * UIProcess/WebsiteData/WebsiteDataStore.cpp: 25 (WebKit::WebsiteDataStore::clearCachedCredentials): 26 * UIProcess/WebsiteData/WebsiteDataStore.h: 27 1 28 2020-09-15 Alex Christensen <achristensen@webkit.org> 2 29 -
trunk/Source/WebKit/NetworkProcess/NetworkProcess.cpp
r267042 r267091 428 428 } 429 429 430 void NetworkProcess::clearCachedCredentials() 431 { 432 defaultStorageSession().credentialStorage().clearCredentials(); 433 if (auto* networkSession = this->networkSession(PAL::SessionID::defaultSessionID())) 430 void NetworkProcess::clearCachedCredentials(PAL::SessionID sessionID) 431 { 432 if (auto* networkSession = this->networkSession(sessionID)) { 433 if (auto* storageSession = networkSession->networkStorageSession()) 434 storageSession->credentialStorage().clearCredentials(); 434 435 networkSession->clearCredentials(); 435 else 436 ASSERT_NOT_REACHED(); 437 438 forEachNetworkSession([] (auto& networkSession) { 439 if (auto storageSession = networkSession.networkStorageSession()) 440 storageSession->credentialStorage().clearCredentials(); 441 networkSession.clearCredentials(); 442 }); 436 } 443 437 } 444 438 -
trunk/Source/WebKit/NetworkProcess/NetworkProcess.h
r267090 r267091 420 420 void deleteWebsiteDataForOrigins(PAL::SessionID, OptionSet<WebsiteDataType>, const Vector<WebCore::SecurityOriginData>& origins, const Vector<String>& cookieHostNames, const Vector<String>& HSTSCacheHostnames, const Vector<RegistrableDomain>&, CallbackID); 421 421 422 void clearCachedCredentials( );422 void clearCachedCredentials(PAL::SessionID); 423 423 424 424 void setCacheStorageParameters(PAL::SessionID, String&& cacheStorageDirectory, SandboxExtension::Handle&&); -
trunk/Source/WebKit/NetworkProcess/NetworkProcess.messages.in
r267090 r267091 40 40 #endif 41 41 42 ClearCachedCredentials( )42 ClearCachedCredentials(PAL::SessionID sessionID) 43 43 44 44 AddWebsiteDataStore(struct WebKit::WebsiteDataStoreParameters websiteDataStoreParameters); -
trunk/Source/WebKit/UIProcess/API/C/WKContext.cpp
r267090 r267091 546 546 } 547 547 548 void WKContextClearCachedCredentials(WKContextRef context)549 {550 WebKit::toImpl(context)->clearCachedCredentials();551 }552 553 548 WKDictionaryRef WKContextCopyPlugInAutoStartOriginHashes(WKContextRef contextRef) 554 549 { -
trunk/Source/WebKit/UIProcess/API/C/WKContextPrivate.h
r267088 r267091 89 89 WK_EXPORT void WKContextSetAllowsAnySSLCertificateForServiceWorkerTesting(WKContextRef, bool); 90 90 91 // Test only. Should be called before running a test.92 WK_EXPORT void WKContextClearCachedCredentials(WKContextRef context);93 94 91 typedef void (*WKContextInvalidMessageFunction)(WKStringRef messageName); 95 92 WK_EXPORT void WKContextSetInvalidMessageFunction(WKContextInvalidMessageFunction invalidMessageFunction); -
trunk/Source/WebKit/UIProcess/API/C/WKWebsiteDataStoreRef.cpp
r267088 r267091 138 138 } 139 139 140 void WKWebsiteDataStoreClearCachedCredentials(WKWebsiteDataStoreRef dataStoreRef) 141 { 142 WebKit::toImpl(dataStoreRef)->clearCachedCredentials(); 143 } 144 140 145 void WKWebsiteDataStoreSetResourceLoadStatisticsDebugModeWithCompletionHandler(WKWebsiteDataStoreRef dataStoreRef, bool enable, void* context, WKWebsiteDataStoreStatisticsDebugModeFunction completionHandler) 141 146 { -
trunk/Source/WebKit/UIProcess/API/C/WKWebsiteDataStoreRef.h
r267088 r267091 45 45 46 46 WK_EXPORT void WKWebsiteDataStoreSetAllowsAnySSLCertificateForWebSocketTesting(WKWebsiteDataStoreRef dataStore, bool allows); 47 48 WK_EXPORT void WKWebsiteDataStoreClearCachedCredentials(WKWebsiteDataStoreRef dataStoreRef); 47 49 48 50 WK_EXPORT bool WKWebsiteDataStoreGetResourceLoadStatisticsEnabled(WKWebsiteDataStoreRef dataStoreRef); -
trunk/Source/WebKit/UIProcess/WebProcessPool.cpp
r267090 r267091 1768 1768 } 1769 1769 1770 void WebProcessPool::clearCachedCredentials( )1770 void WebProcessPool::clearCachedCredentials(const PAL::SessionID& sessionID) 1771 1771 { 1772 1772 if (m_networkProcess) 1773 m_networkProcess->send(Messages::NetworkProcess::ClearCachedCredentials( ), 0);1773 m_networkProcess->send(Messages::NetworkProcess::ClearCachedCredentials(sessionID), 0); 1774 1774 } 1775 1775 -
trunk/Source/WebKit/UIProcess/WebProcessPool.h
r267090 r267091 319 319 static Statistics& statistics(); 320 320 321 void clearCachedCredentials( );321 void clearCachedCredentials(const PAL::SessionID&); 322 322 void terminateNetworkProcess(); 323 323 void terminateAllWebContentProcesses(); -
trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp
r267088 r267091 2270 2270 } 2271 2271 2272 void WebsiteDataStore::clearCachedCredentials() 2273 { 2274 for (auto processPool : WebProcessPool::allProcessPools()) 2275 processPool->clearCachedCredentials(sessionID()); 2276 } 2277 2272 2278 void WebsiteDataStore::dispatchOnQueue(Function<void()>&& function) 2273 2279 { -
trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h
r267088 r267091 240 240 void clearPendingCookies(); 241 241 void flushCookies(CompletionHandler<void()>&&); 242 void clearCachedCredentials(); 242 243 243 244 void setAllowsAnySSLCertificateForWebSocket(bool); -
trunk/Tools/ChangeLog
r267090 r267091 1 2020-09-15 Alex Christensen <achristensen@webkit.org> 2 3 Move WKContextClearCachedCredentials SPI to WKWebsiteDataStoreClearCachedCredentials 4 https://bugs.webkit.org/show_bug.cgi?id=216513 5 6 Reviewed by Chris Dumez. 7 8 * WebKitTestRunner/TestController.cpp: 9 (WTR::TestController::resetStateToConsistentValues): 10 1 11 2020-09-15 Alex Christensen <achristensen@webkit.org> 2 12 -
trunk/Tools/WebKitTestRunner/TestController.cpp
r267090 r267091 1050 1050 WKContextSetCacheModel(TestController::singleton().context(), kWKCacheModelDocumentBrowser); 1051 1051 1052 WK ContextClearCachedCredentials(TestController::singleton().context());1052 WKWebsiteDataStoreClearCachedCredentials(websiteDataStore()); 1053 1053 1054 1054 WKContextResetServiceWorkerFetchTimeoutForTesting(TestController::singleton().context());
Note:
See TracChangeset
for help on using the changeset viewer.