Changeset 250169 in webkit
- Timestamp:
- Sep 20, 2019, 5:13:24 PM (6 years ago)
- Location:
- trunk/Source
- Files:
-
- 4 deleted
- 42 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r250167 r250169 1 2019-09-20 Alex Christensen <achristensen@webkit.org> 2 3 Remove unnecessary abstractions around WebsiteDataStore 4 https://bugs.webkit.org/show_bug.cgi?id=201655 5 6 Reviewed by Chris Dumez. 7 8 * Modules/webdatabase/cocoa/DatabaseManagerCocoa.mm: 9 (WebCore::DatabaseManager::platformInitialize): 10 1 11 2019-09-20 Alex Christensen <achristensen@webkit.org> 2 12 -
trunk/Source/WebCore/Modules/webdatabase/cocoa/DatabaseManagerCocoa.mm
r240437 r250169 36 36 void DatabaseManager::platformInitialize(const String& databasePath) 37 37 { 38 if (databasePath.isEmpty()) 39 return; 40 38 41 // The path needs to exist so that we can resolve it via realPath(). 39 42 if (!FileSystem::fileExists(databasePath)) -
trunk/Source/WebKit/ChangeLog
r250165 r250169 1 2019-09-20 Alex Christensen <achristensen@webkit.org> 2 3 Remove unnecessary abstractions around WebsiteDataStore 4 https://bugs.webkit.org/show_bug.cgi?id=201655 5 6 Reviewed by Chris Dumez. 7 8 * PlatformFTW.cmake: 9 * PlatformWin.cmake: 10 * Sources.txt: 11 * SourcesCocoa.txt: 12 * SourcesGTK.txt: 13 * SourcesWPE.txt: 14 * UIProcess/API/APIHTTPCookieStore.cpp: 15 * UIProcess/API/APIHTTPCookieStore.h: 16 * UIProcess/API/APIPageConfiguration.cpp: 17 (API::PageConfiguration::websiteDataStore): 18 (API::PageConfiguration::setWebsiteDataStore): 19 * UIProcess/API/APIPageConfiguration.h: 20 * UIProcess/API/APIProcessPoolConfiguration.cpp: 21 * UIProcess/API/APIWebsiteDataStore.cpp: Removed. 22 * UIProcess/API/APIWebsiteDataStore.h: Removed. 23 * UIProcess/API/APIWebsitePolicies.cpp: 24 (API::WebsitePolicies::WebsitePolicies): 25 (API::WebsitePolicies::setWebsiteDataStore): 26 (API::WebsitePolicies::data): 27 * UIProcess/API/APIWebsitePolicies.h: 28 * UIProcess/API/C/WKAPICast.h: 29 * UIProcess/API/C/WKContext.cpp: 30 (WKContextSetCacheModel): 31 (WKContextGetCacheModel): 32 * UIProcess/API/C/WKFramePolicyListener.cpp: 33 * UIProcess/API/C/WKWebsiteDataStoreRef.cpp: 34 (WKWebsiteDataStoreGetTypeID): 35 (WKWebsiteDataStoreGetDefaultDataStore): 36 (WKWebsiteDataStoreCreateNonPersistentDataStore): 37 (WKWebsiteDataStoreCreateWithConfiguration): 38 (WKWebsiteDataStoreGetHTTPCookieStore): 39 (WKWebsiteDataStoreSetResourceLoadStatisticsDebugModeWithCompletionHandler): 40 (WKWebsiteDataStoreSetResourceLoadStatisticsPrevalentResourceForDebugMode): 41 (WKWebsiteDataStoreSetStatisticsLastSeen): 42 (WKWebsiteDataStoreSetStatisticsPrevalentResource): 43 (WKWebsiteDataStoreSetStatisticsVeryPrevalentResource): 44 (WKWebsiteDataStoreDumpResourceLoadStatistics): 45 (WKWebsiteDataStoreIsStatisticsPrevalentResource): 46 (WKWebsiteDataStoreIsStatisticsVeryPrevalentResource): 47 (WKWebsiteDataStoreIsStatisticsRegisteredAsSubresourceUnder): 48 (WKWebsiteDataStoreIsStatisticsRegisteredAsSubFrameUnder): 49 (WKWebsiteDataStoreIsStatisticsRegisteredAsRedirectingTo): 50 (WKWebsiteDataStoreSetStatisticsHasHadUserInteraction): 51 (WKWebsiteDataStoreIsStatisticsHasHadUserInteraction): 52 (WKWebsiteDataStoreSetStatisticsGrandfathered): 53 (WKWebsiteDataStoreIsStatisticsGrandfathered): 54 (WKWebsiteDataStoreSetStatisticsSubframeUnderTopFrameOrigin): 55 (WKWebsiteDataStoreSetStatisticsSubresourceUnderTopFrameOrigin): 56 (WKWebsiteDataStoreSetStatisticsSubresourceUniqueRedirectTo): 57 (WKWebsiteDataStoreSetStatisticsSubresourceUniqueRedirectFrom): 58 (WKWebsiteDataStoreSetStatisticsTopFrameUniqueRedirectTo): 59 (WKWebsiteDataStoreSetStatisticsTopFrameUniqueRedirectFrom): 60 (WKWebsiteDataStoreSetStatisticsCrossSiteLoadWithLinkDecoration): 61 (WKWebsiteDataStoreSetStatisticsTimeToLiveUserInteraction): 62 (WKWebsiteDataStoreStatisticsProcessStatisticsAndDataRecords): 63 (WKWebsiteDataStoreStatisticsUpdateCookieBlocking): 64 (WKWebsiteDataStoreStatisticsSubmitTelemetry): 65 (WKWebsiteDataStoreSetStatisticsNotifyPagesWhenDataRecordsWereScanned): 66 (WKWebsiteDataStoreSetStatisticsIsRunningTest): 67 (WKWebsiteDataStoreSetStatisticsShouldClassifyResourcesBeforeDataRecordsRemoval): 68 (WKWebsiteDataStoreSetStatisticsNotifyPagesWhenTelemetryWasCaptured): 69 (WKWebsiteDataStoreSetStatisticsMinimumTimeBetweenDataRecordsRemoval): 70 (WKWebsiteDataStoreSetStatisticsGrandfatheringTime): 71 (WKWebsiteDataStoreSetStatisticsMaxStatisticsEntries): 72 (WKWebsiteDataStoreSetStatisticsPruneEntriesDownTo): 73 (WKWebsiteDataStoreStatisticsClearInMemoryAndPersistentStore): 74 (WKWebsiteDataStoreStatisticsClearInMemoryAndPersistentStoreModifiedSinceHours): 75 (WKWebsiteDataStoreStatisticsClearThroughWebsiteDataRemoval): 76 (WKWebsiteDataStoreStatisticsDeleteCookiesForTesting): 77 (WKWebsiteDataStoreStatisticsHasLocalStorage): 78 (WKWebsiteDataStoreSetStatisticsCacheMaxAgeCap): 79 (WKWebsiteDataStoreStatisticsHasIsolatedSession): 80 (WKWebsiteDataStoreStatisticsResetToConsistentState): 81 (WKWebsiteDataStoreRemoveAllFetchCaches): 82 (WKWebsiteDataStoreRemoveFetchCacheForOrigin): 83 (WKWebsiteDataStoreRemoveAllIndexedDatabases): 84 (WKWebsiteDataStoreRemoveLocalStorage): 85 (WKWebsiteDataStoreRemoveAllServiceWorkerRegistrations): 86 (WKWebsiteDataStoreGetFetchCacheOrigins): 87 (WKWebsiteDataStoreGetFetchCacheSizeForOrigin): 88 (WKWebsiteDataStoreCopyServiceWorkerRegistrationDirectory): 89 (WKWebsiteDataStoreSetServiceWorkerRegistrationDirectory): 90 (WKWebsiteDataStoreClearAllDeviceOrientationPermissions): 91 (WKWebsiteDataStoreSetWebAuthenticationMockConfiguration): 92 (WKWebsiteDataStoreClearAdClickAttributionsThroughWebsiteDataRemoval): 93 * UIProcess/API/C/WKWebsitePolicies.cpp: 94 * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm: Removed. 95 * UIProcess/API/Cocoa/WKWebsiteDataStore.mm: 96 (+[WKWebsiteDataStore defaultDataStore]): 97 (+[WKWebsiteDataStore nonPersistentDataStore]): 98 (-[WKWebsiteDataStore dealloc]): 99 (-[WKWebsiteDataStore httpCookieStore]): 100 (-[WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]): 101 (-[WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]): 102 (+[WKWebsiteDataStore _defaultDataStoreExists]): 103 (+[WKWebsiteDataStore _deleteDefaultDataStoreForTesting]): 104 (-[WKWebsiteDataStore _initWithConfiguration:]): 105 (-[WKWebsiteDataStore _fetchDataRecordsOfTypes:withOptions:completionHandler:]): 106 (-[WKWebsiteDataStore _resourceLoadStatisticsEnabled]): 107 (-[WKWebsiteDataStore _setResourceLoadStatisticsEnabled:]): 108 (-[WKWebsiteDataStore _resourceLoadStatisticsDebugMode]): 109 (-[WKWebsiteDataStore _setResourceLoadStatisticsDebugMode:]): 110 (-[WKWebsiteDataStore _cacheStorageDirectory]): 111 (-[WKWebsiteDataStore _setCacheStorageDirectory:]): 112 (-[WKWebsiteDataStore _serviceWorkerRegistrationDirectory]): 113 (-[WKWebsiteDataStore _setServiceWorkerRegistrationDirectory:]): 114 (-[WKWebsiteDataStore _setBoundInterfaceIdentifier:]): 115 (-[WKWebsiteDataStore _boundInterfaceIdentifier]): 116 (-[WKWebsiteDataStore _setAllowsCellularAccess:]): 117 (-[WKWebsiteDataStore _allowsCellularAccess]): 118 (-[WKWebsiteDataStore _setProxyConfiguration:]): 119 (-[WKWebsiteDataStore _sourceApplicationBundleIdentifier]): 120 (-[WKWebsiteDataStore _setSourceApplicationBundleIdentifier:]): 121 (-[WKWebsiteDataStore _sourceApplicationSecondaryIdentifier]): 122 (-[WKWebsiteDataStore _setSourceApplicationSecondaryIdentifier:]): 123 (-[WKWebsiteDataStore _proxyConfiguration]): 124 (-[WKWebsiteDataStore _indexedDBDatabaseDirectory]): 125 (-[WKWebsiteDataStore _resourceLoadStatisticsSetShouldSubmitTelemetry:]): 126 (-[WKWebsiteDataStore _setResourceLoadStatisticsTestingCallback:]): 127 (-[WKWebsiteDataStore _getAllStorageAccessEntriesFor:completionHandler:]): 128 (-[WKWebsiteDataStore _scheduleCookieBlockingUpdate:]): 129 (-[WKWebsiteDataStore _setPrevalentDomain:completionHandler:]): 130 (-[WKWebsiteDataStore _getIsPrevalentDomain:completionHandler:]): 131 (-[WKWebsiteDataStore _clearPrevalentDomain:completionHandler:]): 132 (-[WKWebsiteDataStore _processStatisticsAndDataRecords:]): 133 (-[WKWebsiteDataStore _hasRegisteredServiceWorker]): 134 (-[WKWebsiteDataStore _delegate]): 135 (-[WKWebsiteDataStore set_delegate:]): 136 * UIProcess/API/Cocoa/WKWebsiteDataStoreInternal.h: 137 * UIProcess/API/glib/APIWebsiteDataStoreGLib.cpp: Removed. 138 * UIProcess/API/glib/WebKitWebsiteDataManager.cpp: 139 (webkitWebsiteDataManagerSetProperty): 140 (webkitWebsiteDataManagerGetDataStore): 141 (webkit_website_data_manager_get_local_storage_directory): 142 (webkit_website_data_manager_get_disk_cache_directory): 143 (webkit_website_data_manager_get_offline_application_cache_directory): 144 (webkit_website_data_manager_get_indexeddb_directory): 145 (webkit_website_data_manager_get_websql_directory): 146 (webkit_website_data_manager_get_hsts_cache_directory): 147 (webkit_website_data_manager_fetch): 148 (webkit_website_data_manager_remove): 149 (webkit_website_data_manager_clear): 150 (webkitWebsiteDataManagerCreate): Deleted. 151 * UIProcess/API/glib/WebKitWebsiteDataManagerPrivate.h: 152 * UIProcess/API/win/APIWebsiteDataStoreWin.cpp: Removed. 153 * UIProcess/Cocoa/NavigationState.mm: 154 * UIProcess/Network/NetworkProcessProxy.cpp: 155 (WebKit::NetworkProcessProxy::NetworkProcessProxy): 156 (WebKit::NetworkProcessProxy::websiteDataStoreFromSessionID): 157 * UIProcess/Network/NetworkProcessProxy.h: 158 * UIProcess/WebFramePolicyListenerProxy.cpp: 159 * UIProcess/WebPageProxy.cpp: 160 (WebKit::WebPageProxy::WebPageProxy): 161 (WebKit::WebPageProxy::receivedNavigationPolicyDecision): 162 * UIProcess/WebProcessPool.cpp: 163 (WebKit::m_webProcessCache): 164 (WebKit::WebProcessPool::ensureNetworkProcess): 165 (WebKit::WebProcessPool::establishWorkerContextConnectionToNetworkProcess): 166 (WebKit::WebProcessPool::tryTakePrewarmedProcess): 167 (WebKit::WebProcessPool::processDidFinishLaunching): 168 (WebKit::WebProcessPool::processForRegistrableDomain): 169 (WebKit::WebProcessPool::createWebPage): 170 (WebKit::WebProcessPool::mayHaveRegisteredServiceWorkers): 171 * UIProcess/WebProcessPool.h: 172 * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm: 173 (WebKit::WebsiteDataStore::defaultApplicationCacheDirectory): 174 (WebKit::WebsiteDataStore::defaultCacheStorageDirectory): 175 (WebKit::WebsiteDataStore::defaultNetworkCacheDirectory): 176 (WebKit::WebsiteDataStore::defaultMediaCacheDirectory): 177 (WebKit::WebsiteDataStore::defaultIndexedDBDatabaseDirectory): 178 (WebKit::WebsiteDataStore::defaultServiceWorkerRegistrationDirectory): 179 (WebKit::WebsiteDataStore::defaultLocalStorageDirectory): 180 (WebKit::WebsiteDataStore::defaultMediaKeysStorageDirectory): 181 (WebKit::WebsiteDataStore::defaultWebSQLDatabaseDirectory): 182 (WebKit::WebsiteDataStore::defaultResourceLoadStatisticsDirectory): 183 (WebKit::WebsiteDataStore::defaultJavaScriptConfigurationDirectory): 184 (WebKit::WebsiteDataStore::tempDirectoryFileSystemRepresentation): 185 (WebKit::WebsiteDataStore::cacheDirectoryFileSystemRepresentation): 186 (WebKit::WebsiteDataStore::websiteDataDirectoryFileSystemRepresentation): 187 * UIProcess/WebsiteData/WebsiteDataStore.cpp: 188 (WebKit::globalDefaultDataStore): 189 (WebKit::WebsiteDataStore::defaultDataStore): 190 (WebKit::WebsiteDataStore::deleteDefaultDataStoreForTesting): 191 (WebKit::WebsiteDataStore::defaultDataStoreExists): 192 (WebKit::WebsiteDataStore::defaultDataStoreConfiguration): 193 (WebKit::WebsiteDataStore::isAssociatedProcessPool const): 194 (WebKit::WebsiteDataStore::defaultMediaCacheDirectory): 195 (WebKit::WebsiteDataStore::defaultJavaScriptConfigurationDirectory): 196 (WebKit::WebsiteDataStore::defaultDeviceIdHashSaltsStorageDirectory): 197 * UIProcess/WebsiteData/WebsiteDataStore.h: 198 * UIProcess/WebsiteData/WebsiteDataStoreConfiguration.cpp: 199 * UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: 200 (WebKit::WebsiteDataStore::defaultApplicationCacheDirectory): 201 (WebKit::WebsiteDataStore::defaultCacheStorageDirectory): 202 (WebKit::WebsiteDataStore::defaultNetworkCacheDirectory): 203 (WebKit::WebsiteDataStore::defaultIndexedDBDatabaseDirectory): 204 (WebKit::WebsiteDataStore::defaultServiceWorkerRegistrationDirectory): 205 (WebKit::WebsiteDataStore::defaultLocalStorageDirectory): 206 (WebKit::WebsiteDataStore::defaultMediaKeysStorageDirectory): 207 (WebKit::WebsiteDataStore::defaultWebSQLDatabaseDirectory): 208 (WebKit::WebsiteDataStore::defaultResourceLoadStatisticsDirectory): 209 (WebKit::WebsiteDataStore::cacheDirectoryFileSystemRepresentation): 210 (WebKit::WebsiteDataStore::websiteDataDirectoryFileSystemRepresentation): 211 * UIProcess/glib/WebProcessProxyGLib.cpp: 212 (WebKit::WebProcessProxy::platformGetLaunchOptions): 213 * UIProcess/glib/WebsiteDataStoreGLib.cpp: Copied from Source/WebKit/UIProcess/API/glib/APIWebsiteDataStoreGLib.cpp. 214 (API::WebsiteDataStore::defaultApplicationCacheDirectory): Deleted. 215 (API::WebsiteDataStore::defaultNetworkCacheDirectory): Deleted. 216 (API::WebsiteDataStore::defaultCacheStorageDirectory): Deleted. 217 (API::WebsiteDataStore::defaultIndexedDBDatabaseDirectory): Deleted. 218 (API::WebsiteDataStore::defaultServiceWorkerRegistrationDirectory): Deleted. 219 (API::WebsiteDataStore::defaultLocalStorageDirectory): Deleted. 220 (API::WebsiteDataStore::defaultMediaKeysStorageDirectory): Deleted. 221 (API::WebsiteDataStore::defaultDeviceIdHashSaltsStorageDirectory): Deleted. 222 (API::WebsiteDataStore::defaultWebSQLDatabaseDirectory): Deleted. 223 (API::WebsiteDataStore::defaultHSTSDirectory): Deleted. 224 (API::WebsiteDataStore::defaultResourceLoadStatisticsDirectory): Deleted. 225 (API::WebsiteDataStore::cacheDirectoryFileSystemRepresentation): Deleted. 226 (API::WebsiteDataStore::websiteDataDirectoryFileSystemRepresentation): Deleted. 227 * WebKit.xcodeproj/project.pbxproj: 228 * WebProcess/MediaCache/WebMediaKeyStorageManager.cpp: 229 (WebKit::WebMediaKeyStorageManager::setWebsiteDataStore): 230 1 231 2019-09-20 Chris Dumez <cdumez@apple.com> 2 232 -
trunk/Source/WebKit/PlatformFTW.cmake
r250119 r250169 46 46 47 47 UIProcess/API/C/win/WKView.cpp 48 49 UIProcess/API/win/APIWebsiteDataStoreWin.cpp50 48 51 49 UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp -
trunk/Source/WebKit/PlatformWin.cmake
r249778 r250169 46 46 47 47 UIProcess/API/C/win/WKView.cpp 48 49 UIProcess/API/win/APIWebsiteDataStoreWin.cpp50 48 51 49 UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp -
trunk/Source/WebKit/Sources.txt
r250148 r250169 319 319 UIProcess/API/APIUserScript.cpp 320 320 UIProcess/API/APIUserStyleSheet.cpp 321 UIProcess/API/APIWebsiteDataStore.cpp322 321 UIProcess/API/APIWebsitePolicies.cpp 323 322 UIProcess/API/APIWindowFeatures.cpp -
trunk/Source/WebKit/SourcesCocoa.txt
r249778 r250169 275 275 UIProcess/API/Cocoa/APIHTTPCookieStoreCocoa.mm 276 276 UIProcess/API/Cocoa/APISerializedScriptValueCocoa.mm 277 UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm278 277 UIProcess/API/Cocoa/LegacyBundleForClass.mm 279 278 UIProcess/API/Cocoa/NSAttributedString.mm -
trunk/Source/WebKit/SourcesGTK.txt
r249778 r250169 126 126 127 127 UIProcess/API/glib/APIContentRuleListStoreGLib.cpp @no-unify 128 UIProcess/API/glib/APIWebsiteDataStoreGLib.cpp @no-unify129 128 UIProcess/API/glib/IconDatabase.cpp @no-unify 130 129 UIProcess/API/glib/WebKitApplicationInfo.cpp @no-unify … … 233 232 UIProcess/glib/WebProcessPoolGLib.cpp 234 233 UIProcess/glib/WebProcessProxyGLib.cpp 234 UIProcess/glib/WebsiteDataStoreGLib.cpp @no-unify 235 235 236 236 UIProcess/gstreamer/InstallMissingMediaPluginsPermissionRequest.cpp -
trunk/Source/WebKit/SourcesWPE.txt
r249778 r250169 115 115 116 116 UIProcess/API/glib/APIContentRuleListStoreGLib.cpp @no-unify 117 UIProcess/API/glib/APIWebsiteDataStoreGLib.cpp @no-unify118 117 UIProcess/API/glib/IconDatabase.cpp @no-unify 119 118 UIProcess/API/glib/WebKitApplicationInfo.cpp @no-unify … … 193 192 UIProcess/glib/WebProcessPoolGLib.cpp 194 193 UIProcess/glib/WebProcessProxyGLib.cpp 194 UIProcess/glib/WebsiteDataStoreGLib.cpp @no-unify 195 195 196 196 UIProcess/Launcher/glib/ProcessLauncherGLib.cpp -
trunk/Source/WebKit/UIProcess/API/APIHTTPCookieStore.cpp
r249778 r250169 27 27 #include "APIHTTPCookieStore.h" 28 28 29 #include "APIWebsiteDataStore.h"30 29 #include "WebCookieManagerProxy.h" 31 30 #include "WebProcessPool.h" 31 #include "WebsiteDataStore.h" 32 32 #include <WebCore/Cookie.h> 33 33 #include <WebCore/CookieStorage.h> -
trunk/Source/WebKit/UIProcess/API/APIHTTPCookieStore.h
r249778 r250169 49 49 50 50 class APIWebCookieManagerProxyObserver; 51 class WebsiteDataStore;52 51 53 52 class HTTPCookieStore final : public ObjectImpl<Object::Type::HTTPCookieStore> { -
trunk/Source/WebKit/UIProcess/API/APIPageConfiguration.cpp
r249778 r250169 152 152 } 153 153 154 API::WebsiteDataStore* PageConfiguration::websiteDataStore()154 WebKit::WebsiteDataStore* PageConfiguration::websiteDataStore() 155 155 { 156 156 return m_websiteDataStore.get(); 157 157 } 158 158 159 void PageConfiguration::setWebsiteDataStore( API::WebsiteDataStore* websiteDataStore)159 void PageConfiguration::setWebsiteDataStore(WebKit::WebsiteDataStore* websiteDataStore) 160 160 { 161 161 m_websiteDataStore = websiteDataStore; -
trunk/Source/WebKit/UIProcess/API/APIPageConfiguration.h
r249778 r250169 45 45 class WebURLSchemeHandler; 46 46 class WebUserContentControllerProxy; 47 class WebsiteDataStore; 47 48 } 48 49 … … 50 51 51 52 class ApplicationManifest; 52 class WebsiteDataStore;53 53 class WebsitePolicies; 54 54 … … 85 85 void setVisitedLinkStore(WebKit::VisitedLinkStore*); 86 86 87 Web siteDataStore* websiteDataStore();88 void setWebsiteDataStore(Web siteDataStore*);87 WebKit::WebsiteDataStore* websiteDataStore(); 88 void setWebsiteDataStore(WebKit::WebsiteDataStore*); 89 89 90 90 WebsitePolicies* defaultWebsitePolicies() const; … … 146 146 RefPtr<WebKit::VisitedLinkStore> m_visitedLinkStore; 147 147 148 RefPtr<Web siteDataStore> m_websiteDataStore;148 RefPtr<WebKit::WebsiteDataStore> m_websiteDataStore; 149 149 RefPtr<WebsitePolicies> m_defaultWebsitePolicies; 150 150 -
trunk/Source/WebKit/UIProcess/API/APIProcessPoolConfiguration.cpp
r250148 r250169 27 27 #include "APIProcessPoolConfiguration.h" 28 28 29 #include "APIWebsiteDataStore.h"30 29 #include "WebProcessPool.h" 30 #include "WebsiteDataStore.h" 31 31 32 32 namespace API { -
trunk/Source/WebKit/UIProcess/API/APIWebsitePolicies.cpp
r249778 r250169 27 27 #include "APIWebsitePolicies.h" 28 28 29 #include " APIWebsiteDataStore.h"29 #include "WebsiteDataStore.h" 30 30 #include "WebsitePoliciesData.h" 31 31 … … 34 34 WebsitePolicies::WebsitePolicies() = default; 35 35 36 WebsitePolicies::WebsitePolicies(bool contentBlockersEnabled, OptionSet<WebKit::WebsiteAutoplayQuirk> allowedAutoplayQuirks, WebKit::WebsiteAutoplayPolicy autoplayPolicy, Vector<WebCore::HTTPHeaderField>&& legacyCustomHeaderFields, Vector<WebCore::CustomHeaderFields>&& customHeaderFields, WebKit::WebsitePopUpPolicy popUpPolicy, RefPtr<Web siteDataStore>&& websiteDataStore)36 WebsitePolicies::WebsitePolicies(bool contentBlockersEnabled, OptionSet<WebKit::WebsiteAutoplayQuirk> allowedAutoplayQuirks, WebKit::WebsiteAutoplayPolicy autoplayPolicy, Vector<WebCore::HTTPHeaderField>&& legacyCustomHeaderFields, Vector<WebCore::CustomHeaderFields>&& customHeaderFields, WebKit::WebsitePopUpPolicy popUpPolicy, RefPtr<WebKit::WebsiteDataStore>&& websiteDataStore) 37 37 : m_contentBlockersEnabled(contentBlockersEnabled) 38 38 , m_allowedAutoplayQuirks(allowedAutoplayQuirks) … … 85 85 } 86 86 87 void WebsitePolicies::setWebsiteDataStore(RefPtr<Web siteDataStore>&& websiteDataStore)87 void WebsitePolicies::setWebsiteDataStore(RefPtr<WebKit::WebsiteDataStore>&& websiteDataStore) 88 88 { 89 89 m_websiteDataStore = WTFMove(websiteDataStore); … … 109 109 WTFMove(customHeaderFields), 110 110 popUpPolicy(), 111 m_websiteDataStore ? Optional<WebKit::WebsiteDataStoreParameters> { m_websiteDataStore-> websiteDataStore().parameters() } : WTF::nullopt,111 m_websiteDataStore ? Optional<WebKit::WebsiteDataStoreParameters> { m_websiteDataStore->parameters() } : WTF::nullopt, 112 112 m_customUserAgent, 113 113 m_customJavaScriptUserAgentAsSiteSpecificQuirks, -
trunk/Source/WebKit/UIProcess/API/APIWebsitePolicies.h
r249778 r250169 43 43 namespace WebKit { 44 44 struct WebsitePoliciesData; 45 class WebsiteDataStore; 45 46 } 46 47 47 48 namespace API { 48 49 class WebsiteDataStore;50 49 51 50 class WebsitePolicies final : public API::ObjectImpl<API::Object::Type::WebsitePolicies> { … … 80 79 void setPopUpPolicy(WebKit::WebsitePopUpPolicy policy) { m_popUpPolicy = policy; } 81 80 82 Web siteDataStore* websiteDataStore() const { return m_websiteDataStore.get(); }83 void setWebsiteDataStore(RefPtr<Web siteDataStore>&&);81 WebKit::WebsiteDataStore* websiteDataStore() const { return m_websiteDataStore.get(); } 82 void setWebsiteDataStore(RefPtr<WebKit::WebsiteDataStore>&&); 84 83 85 84 WebKit::WebsitePoliciesData data(); … … 119 118 120 119 private: 121 WebsitePolicies(bool contentBlockersEnabled, OptionSet<WebKit::WebsiteAutoplayQuirk>, WebKit::WebsiteAutoplayPolicy, Vector<WebCore::HTTPHeaderField>&&, Vector<WebCore::CustomHeaderFields>&&, WebKit::WebsitePopUpPolicy, RefPtr<Web siteDataStore>&&);120 WebsitePolicies(bool contentBlockersEnabled, OptionSet<WebKit::WebsiteAutoplayQuirk>, WebKit::WebsiteAutoplayPolicy, Vector<WebCore::HTTPHeaderField>&&, Vector<WebCore::CustomHeaderFields>&&, WebKit::WebsitePopUpPolicy, RefPtr<WebKit::WebsiteDataStore>&&); 122 121 123 122 bool m_contentBlockersEnabled { true }; … … 130 129 Vector<WebCore::CustomHeaderFields> m_customHeaderFields; 131 130 WebKit::WebsitePopUpPolicy m_popUpPolicy { WebKit::WebsitePopUpPolicy::Default }; 132 RefPtr<Web siteDataStore> m_websiteDataStore;131 RefPtr<WebKit::WebsiteDataStore> m_websiteDataStore; 133 132 WTF::String m_customUserAgent; 134 133 WTF::String m_customJavaScriptUserAgentAsSiteSpecificQuirks; -
trunk/Source/WebKit/UIProcess/API/C/WKAPICast.h
r249778 r250169 70 70 class SessionState; 71 71 class UserScript; 72 class WebsiteDataStore;73 72 class WebsitePolicies; 74 73 class WindowFeatures; … … 114 113 class WebUserContentControllerProxy; 115 114 class WebViewportAttributes; 115 class WebsiteDataStore; 116 116 class WebsiteDataStoreConfiguration; 117 117 … … 170 170 WK_ADD_API_MAPPING(WKUserScriptRef, API::UserScript) 171 171 WK_ADD_API_MAPPING(WKViewportAttributesRef, WebViewportAttributes) 172 WK_ADD_API_MAPPING(WKWebsiteDataStoreRef, API::WebsiteDataStore)172 WK_ADD_API_MAPPING(WKWebsiteDataStoreRef, WebKit::WebsiteDataStore) 173 173 WK_ADD_API_MAPPING(WKWebsiteDataStoreConfigurationRef, WebKit::WebsiteDataStoreConfiguration) 174 174 WK_ADD_API_MAPPING(WKWebsitePoliciesRef, API::WebsitePolicies) -
trunk/Source/WebKit/UIProcess/API/C/WKContext.cpp
r250148 r250169 322 322 void WKContextSetCacheModel(WKContextRef contextRef, WKCacheModel cacheModel) 323 323 { 324 LegacyGlobalSettings::singleton().setCacheModel(WebKit::toCacheModel(cacheModel));324 WebKit::LegacyGlobalSettings::singleton().setCacheModel(WebKit::toCacheModel(cacheModel)); 325 325 } 326 326 327 327 WKCacheModel WKContextGetCacheModel(WKContextRef contextRef) 328 328 { 329 return WebKit::toAPI( LegacyGlobalSettings::singleton().cacheModel());329 return WebKit::toAPI(WebKit::LegacyGlobalSettings::singleton().cacheModel()); 330 330 } 331 331 -
trunk/Source/WebKit/UIProcess/API/C/WKFramePolicyListener.cpp
r249778 r250169 27 27 #include "WKFramePolicyListener.h" 28 28 29 #include "APIWebsiteDataStore.h"30 29 #include "APIWebsitePolicies.h" 31 30 #include "WKAPICast.h" … … 33 32 #include "WebFrameProxy.h" 34 33 #include "WebProcessPool.h" 34 #include "WebsiteDataStore.h" 35 35 #include "WebsitePoliciesData.h" 36 36 -
trunk/Source/WebKit/UIProcess/API/C/WKWebsiteDataStoreRef.cpp
r250150 r250169 28 28 29 29 #include "APIArray.h" 30 #include "API WebsiteDataStore.h"30 #include "APIHTTPCookieStore.h" 31 31 #include "MockWebAuthenticationConfiguration.h" 32 32 #include "ShouldGrandfatherStatistics.h" … … 42 42 #include "WebsiteDataFetchOption.h" 43 43 #include "WebsiteDataRecord.h" 44 #include "WebsiteDataStore.h" 44 45 #include "WebsiteDataType.h" 45 46 #include <wtf/CallbackAggregator.h> … … 48 49 WKTypeID WKWebsiteDataStoreGetTypeID() 49 50 { 50 return WebKit::toAPI( API::WebsiteDataStore::APIType);51 return WebKit::toAPI(WebKit::WebsiteDataStore::APIType); 51 52 } 52 53 53 54 WKWebsiteDataStoreRef WKWebsiteDataStoreGetDefaultDataStore() 54 55 { 55 return WebKit::toAPI( API::WebsiteDataStore::defaultDataStore().ptr());56 return WebKit::toAPI(WebKit::WebsiteDataStore::defaultDataStore().ptr()); 56 57 } 57 58 58 59 WKWebsiteDataStoreRef WKWebsiteDataStoreCreateNonPersistentDataStore() 59 60 { 60 return WebKit::toAPI(& API::WebsiteDataStore::createNonPersistentDataStore().leakRef());61 return WebKit::toAPI(&WebKit::WebsiteDataStore::createNonPersistent().leakRef()); 61 62 } 62 63 … … 64 65 { 65 66 auto sessionID = WebKit::toImpl(configuration)->isPersistent() ? PAL::SessionID::generatePersistentSessionID() : PAL::SessionID::generateEphemeralSessionID(); 66 return WebKit::toAPI(& API::WebsiteDataStore::create(*WebKit::toImpl(configuration), sessionID).leakRef());67 return WebKit::toAPI(&WebKit::WebsiteDataStore::create(*WebKit::toImpl(configuration), sessionID).leakRef()); 67 68 } 68 69 … … 84 85 WKHTTPCookieStoreRef WKWebsiteDataStoreGetHTTPCookieStore(WKWebsiteDataStoreRef dataStoreRef) 85 86 { 86 return WebKit::toAPI(&WebKit::toImpl(dataStoreRef)-> httpCookieStore());87 return WebKit::toAPI(&WebKit::toImpl(dataStoreRef)->cookieStore()); 87 88 } 88 89 … … 90 91 { 91 92 #if ENABLE(RESOURCE_LOAD_STATISTICS) 92 WebKit::toImpl(dataStoreRef)-> websiteDataStore().setResourceLoadStatisticsDebugMode(enable, [context, completionHandler] {93 WebKit::toImpl(dataStoreRef)->setResourceLoadStatisticsDebugMode(enable, [context, completionHandler] { 93 94 completionHandler(context); 94 95 }); … … 101 102 { 102 103 #if ENABLE(RESOURCE_LOAD_STATISTICS) 103 WebKit::toImpl(dataStoreRef)-> websiteDataStore().setPrevalentResourceForDebugMode(URL(URL(), WebKit::toImpl(host)->string()), [context, completionHandler] {104 WebKit::toImpl(dataStoreRef)->setPrevalentResourceForDebugMode(URL(URL(), WebKit::toImpl(host)->string()), [context, completionHandler] { 104 105 completionHandler(context); 105 106 }); … … 111 112 { 112 113 #if ENABLE(RESOURCE_LOAD_STATISTICS) 113 WebKit::toImpl(dataStoreRef)-> websiteDataStore().setLastSeen(URL(URL(), WebKit::toImpl(host)->string()), Seconds { seconds }, [context, completionHandler] {114 WebKit::toImpl(dataStoreRef)->setLastSeen(URL(URL(), WebKit::toImpl(host)->string()), Seconds { seconds }, [context, completionHandler] { 114 115 completionHandler(context); 115 116 }); … … 122 123 { 123 124 #if ENABLE(RESOURCE_LOAD_STATISTICS) 124 auto& websiteDataStore = WebKit::toImpl(dataStoreRef)->websiteDataStore();125 auto& websiteDataStore = *WebKit::toImpl(dataStoreRef); 125 126 126 127 if (value) … … 140 141 { 141 142 #if ENABLE(RESOURCE_LOAD_STATISTICS) 142 auto& websiteDataStore = WebKit::toImpl(dataStoreRef)->websiteDataStore();143 auto& websiteDataStore = *WebKit::toImpl(dataStoreRef); 143 144 144 145 if (value) … … 158 159 { 159 160 #if ENABLE(RESOURCE_LOAD_STATISTICS) 160 WebKit::toImpl(dataStoreRef)-> websiteDataStore().dumpResourceLoadStatistics([context, callback] (const String& resourceLoadStatistics) {161 WebKit::toImpl(dataStoreRef)->dumpResourceLoadStatistics([context, callback] (const String& resourceLoadStatistics) { 161 162 callback(WebKit::toAPI(resourceLoadStatistics.impl()), context); 162 163 }); … … 169 170 { 170 171 #if ENABLE(RESOURCE_LOAD_STATISTICS) 171 WebKit::toImpl(dataStoreRef)-> websiteDataStore().isPrevalentResource(URL(URL(), WebKit::toImpl(host)->string()), [context, callback](bool isPrevalentResource) {172 WebKit::toImpl(dataStoreRef)->isPrevalentResource(URL(URL(), WebKit::toImpl(host)->string()), [context, callback](bool isPrevalentResource) { 172 173 callback(isPrevalentResource, context); 173 174 }); … … 180 181 { 181 182 #if ENABLE(RESOURCE_LOAD_STATISTICS) 182 WebKit::toImpl(dataStoreRef)-> websiteDataStore().isVeryPrevalentResource(URL(URL(), WebKit::toImpl(host)->string()), [context, callback](bool isVeryPrevalentResource) {183 WebKit::toImpl(dataStoreRef)->isVeryPrevalentResource(URL(URL(), WebKit::toImpl(host)->string()), [context, callback](bool isVeryPrevalentResource) { 183 184 callback(isVeryPrevalentResource, context); 184 185 }); … … 191 192 { 192 193 #if ENABLE(RESOURCE_LOAD_STATISTICS) 193 WebKit::toImpl(dataStoreRef)-> websiteDataStore().isRegisteredAsSubresourceUnder(URL(URL(), WebKit::toImpl(subresourceHost)->string()), URL(URL(), WebKit::toImpl(topFrameHost)->string()), [context, callback](bool isRegisteredAsSubresourceUnder) {194 WebKit::toImpl(dataStoreRef)->isRegisteredAsSubresourceUnder(URL(URL(), WebKit::toImpl(subresourceHost)->string()), URL(URL(), WebKit::toImpl(topFrameHost)->string()), [context, callback](bool isRegisteredAsSubresourceUnder) { 194 195 callback(isRegisteredAsSubresourceUnder, context); 195 196 }); … … 202 203 { 203 204 #if ENABLE(RESOURCE_LOAD_STATISTICS) 204 WebKit::toImpl(dataStoreRef)-> websiteDataStore().isRegisteredAsSubFrameUnder(URL(URL(), WebKit::toImpl(subFrameHost)->string()), URL(URL(), WebKit::toImpl(topFrameHost)->string()), [context, callback](bool isRegisteredAsSubFrameUnder) {205 WebKit::toImpl(dataStoreRef)->isRegisteredAsSubFrameUnder(URL(URL(), WebKit::toImpl(subFrameHost)->string()), URL(URL(), WebKit::toImpl(topFrameHost)->string()), [context, callback](bool isRegisteredAsSubFrameUnder) { 205 206 callback(isRegisteredAsSubFrameUnder, context); 206 207 }); … … 213 214 { 214 215 #if ENABLE(RESOURCE_LOAD_STATISTICS) 215 WebKit::toImpl(dataStoreRef)-> websiteDataStore().isRegisteredAsRedirectingTo(URL(URL(), WebKit::toImpl(hostRedirectedFrom)->string()), URL(URL(), WebKit::toImpl(hostRedirectedTo)->string()), [context, callback](bool isRegisteredAsRedirectingTo) {216 WebKit::toImpl(dataStoreRef)->isRegisteredAsRedirectingTo(URL(URL(), WebKit::toImpl(hostRedirectedFrom)->string()), URL(URL(), WebKit::toImpl(hostRedirectedTo)->string()), [context, callback](bool isRegisteredAsRedirectingTo) { 216 217 callback(isRegisteredAsRedirectingTo, context); 217 218 }); … … 224 225 { 225 226 #if ENABLE(RESOURCE_LOAD_STATISTICS) 226 auto& dataStore = WebKit::toImpl(dataStoreRef)->websiteDataStore();227 auto& dataStore = *WebKit::toImpl(dataStoreRef); 227 228 228 229 if (value) … … 242 243 { 243 244 #if ENABLE(RESOURCE_LOAD_STATISTICS) 244 WebKit::toImpl(dataStoreRef)-> websiteDataStore().hasHadUserInteraction(URL(URL(), WebKit::toImpl(host)->string()), [context, callback](bool hasHadUserInteraction) {245 WebKit::toImpl(dataStoreRef)->hasHadUserInteraction(URL(URL(), WebKit::toImpl(host)->string()), [context, callback](bool hasHadUserInteraction) { 245 246 callback(hasHadUserInteraction, context); 246 247 }); … … 253 254 { 254 255 #if ENABLE(RESOURCE_LOAD_STATISTICS) 255 WebKit::toImpl(dataStoreRef)-> websiteDataStore().setGrandfathered(URL(URL(), WebKit::toImpl(host)->string()), value, [] { });256 WebKit::toImpl(dataStoreRef)->setGrandfathered(URL(URL(), WebKit::toImpl(host)->string()), value, [] { }); 256 257 #endif 257 258 } … … 260 261 { 261 262 #if ENABLE(RESOURCE_LOAD_STATISTICS) 262 WebKit::toImpl(dataStoreRef)-> websiteDataStore().hasHadUserInteraction(URL(URL(), WebKit::toImpl(host)->string()), [context, callback](bool isGrandfathered) {263 WebKit::toImpl(dataStoreRef)->hasHadUserInteraction(URL(URL(), WebKit::toImpl(host)->string()), [context, callback](bool isGrandfathered) { 263 264 callback(isGrandfathered, context); 264 265 }); … … 271 272 { 272 273 #if ENABLE(RESOURCE_LOAD_STATISTICS) 273 WebKit::toImpl(dataStoreRef)-> websiteDataStore().setSubframeUnderTopFrameDomain(URL(URL(), WebKit::toImpl(host)->string()), URL(URL(), WebKit::toImpl(topFrameHost)->string()), [] { });274 WebKit::toImpl(dataStoreRef)->setSubframeUnderTopFrameDomain(URL(URL(), WebKit::toImpl(host)->string()), URL(URL(), WebKit::toImpl(topFrameHost)->string()), [] { }); 274 275 #endif 275 276 } … … 278 279 { 279 280 #if ENABLE(RESOURCE_LOAD_STATISTICS) 280 WebKit::toImpl(dataStoreRef)-> websiteDataStore().setSubresourceUnderTopFrameDomain(URL(URL(), WebKit::toImpl(host)->string()), URL(URL(), WebKit::toImpl(topFrameHost)->string()), [] { });281 WebKit::toImpl(dataStoreRef)->setSubresourceUnderTopFrameDomain(URL(URL(), WebKit::toImpl(host)->string()), URL(URL(), WebKit::toImpl(topFrameHost)->string()), [] { }); 281 282 #endif 282 283 } … … 285 286 { 286 287 #if ENABLE(RESOURCE_LOAD_STATISTICS) 287 WebKit::toImpl(dataStoreRef)-> websiteDataStore().setSubresourceUniqueRedirectTo(URL(URL(), WebKit::toImpl(host)->string()), URL(URL(), WebKit::toImpl(hostRedirectedTo)->string()), [] { });288 WebKit::toImpl(dataStoreRef)->setSubresourceUniqueRedirectTo(URL(URL(), WebKit::toImpl(host)->string()), URL(URL(), WebKit::toImpl(hostRedirectedTo)->string()), [] { }); 288 289 #endif 289 290 } … … 292 293 { 293 294 #if ENABLE(RESOURCE_LOAD_STATISTICS) 294 WebKit::toImpl(dataStoreRef)-> websiteDataStore().setSubresourceUniqueRedirectFrom(URL(URL(), WebKit::toImpl(host)->string()), URL(URL(), WebKit::toImpl(hostRedirectedFrom)->string()), [] { });295 WebKit::toImpl(dataStoreRef)->setSubresourceUniqueRedirectFrom(URL(URL(), WebKit::toImpl(host)->string()), URL(URL(), WebKit::toImpl(hostRedirectedFrom)->string()), [] { }); 295 296 #endif 296 297 } … … 299 300 { 300 301 #if ENABLE(RESOURCE_LOAD_STATISTICS) 301 WebKit::toImpl(dataStoreRef)-> websiteDataStore().setTopFrameUniqueRedirectTo(URL(URL(), WebKit::toImpl(host)->string()), URL(URL(), WebKit::toImpl(hostRedirectedTo)->string()), [] { });302 WebKit::toImpl(dataStoreRef)->setTopFrameUniqueRedirectTo(URL(URL(), WebKit::toImpl(host)->string()), URL(URL(), WebKit::toImpl(hostRedirectedTo)->string()), [] { }); 302 303 #endif 303 304 } … … 306 307 { 307 308 #if ENABLE(RESOURCE_LOAD_STATISTICS) 308 WebKit::toImpl(dataStoreRef)-> websiteDataStore().setTopFrameUniqueRedirectFrom(URL(URL(), WebKit::toImpl(host)->string()), URL(URL(), WebKit::toImpl(hostRedirectedFrom)->string()), [] { });309 WebKit::toImpl(dataStoreRef)->setTopFrameUniqueRedirectFrom(URL(URL(), WebKit::toImpl(host)->string()), URL(URL(), WebKit::toImpl(hostRedirectedFrom)->string()), [] { }); 309 310 #endif 310 311 } … … 313 314 { 314 315 #if ENABLE(RESOURCE_LOAD_STATISTICS) 315 WebKit::toImpl(dataStoreRef)-> websiteDataStore().setCrossSiteLoadWithLinkDecorationForTesting(URL(URL(), WebKit::toImpl(fromHost)->string()), URL(URL(), WebKit::toImpl(toHost)->string()), [context, callback] {316 WebKit::toImpl(dataStoreRef)->setCrossSiteLoadWithLinkDecorationForTesting(URL(URL(), WebKit::toImpl(fromHost)->string()), URL(URL(), WebKit::toImpl(toHost)->string()), [context, callback] { 316 317 callback(context); 317 318 }); … … 324 325 { 325 326 #if ENABLE(RESOURCE_LOAD_STATISTICS) 326 WebKit::toImpl(dataStoreRef)-> websiteDataStore().setTimeToLiveUserInteraction(Seconds { seconds }, [context, callback] {327 WebKit::toImpl(dataStoreRef)->setTimeToLiveUserInteraction(Seconds { seconds }, [context, callback] { 327 328 callback(context); 328 329 }); … … 335 336 { 336 337 #if ENABLE(RESOURCE_LOAD_STATISTICS) 337 WebKit::toImpl(dataStoreRef)-> websiteDataStore().scheduleStatisticsAndDataRecordsProcessing([context, callback] {338 WebKit::toImpl(dataStoreRef)->scheduleStatisticsAndDataRecordsProcessing([context, callback] { 338 339 callback(context); 339 340 }); … … 346 347 { 347 348 #if ENABLE(RESOURCE_LOAD_STATISTICS) 348 WebKit::toImpl(dataStoreRef)-> websiteDataStore().scheduleCookieBlockingUpdate([context, completionHandler]() {349 WebKit::toImpl(dataStoreRef)->scheduleCookieBlockingUpdate([context, completionHandler]() { 349 350 completionHandler(context); 350 351 }); … … 357 358 { 358 359 #if ENABLE(RESOURCE_LOAD_STATISTICS) 359 WebKit::toImpl(dataStoreRef)-> websiteDataStore().submitTelemetry();360 WebKit::toImpl(dataStoreRef)->submitTelemetry(); 360 361 #endif 361 362 } … … 364 365 { 365 366 #if ENABLE(RESOURCE_LOAD_STATISTICS) 366 WebKit::toImpl(dataStoreRef)-> websiteDataStore().setNotifyPagesWhenDataRecordsWereScanned(value, [] { });367 WebKit::toImpl(dataStoreRef)->setNotifyPagesWhenDataRecordsWereScanned(value, [] { }); 367 368 #endif 368 369 } … … 371 372 { 372 373 #if ENABLE(RESOURCE_LOAD_STATISTICS) 373 WebKit::toImpl(dataStoreRef)-> websiteDataStore().setIsRunningResourceLoadStatisticsTest(value, [context, callback] {374 WebKit::toImpl(dataStoreRef)->setIsRunningResourceLoadStatisticsTest(value, [context, callback] { 374 375 callback(context); 375 376 }); … … 382 383 { 383 384 #if ENABLE(RESOURCE_LOAD_STATISTICS) 384 WebKit::toImpl(dataStoreRef)-> websiteDataStore().setShouldClassifyResourcesBeforeDataRecordsRemoval(value, []() { });385 WebKit::toImpl(dataStoreRef)->setShouldClassifyResourcesBeforeDataRecordsRemoval(value, []() { }); 385 386 #endif 386 387 } … … 389 390 { 390 391 #if ENABLE(RESOURCE_LOAD_STATISTICS) 391 WebKit::toImpl(dataStoreRef)-> websiteDataStore().setNotifyPagesWhenTelemetryWasCaptured(value, []() { });392 WebKit::toImpl(dataStoreRef)->setNotifyPagesWhenTelemetryWasCaptured(value, []() { }); 392 393 #endif 393 394 } … … 396 397 { 397 398 #if ENABLE(RESOURCE_LOAD_STATISTICS) 398 WebKit::toImpl(dataStoreRef)-> websiteDataStore().setMinimumTimeBetweenDataRecordsRemoval(Seconds { seconds }, []() { });399 WebKit::toImpl(dataStoreRef)->setMinimumTimeBetweenDataRecordsRemoval(Seconds { seconds }, []() { }); 399 400 #endif 400 401 } … … 403 404 { 404 405 #if ENABLE(RESOURCE_LOAD_STATISTICS) 405 WebKit::toImpl(dataStoreRef)-> websiteDataStore().setGrandfatheringTime(Seconds { seconds }, []() { });406 WebKit::toImpl(dataStoreRef)->setGrandfatheringTime(Seconds { seconds }, []() { }); 406 407 #endif 407 408 } … … 410 411 { 411 412 #if ENABLE(RESOURCE_LOAD_STATISTICS) 412 WebKit::toImpl(dataStoreRef)-> websiteDataStore().setMaxStatisticsEntries(entries, []() { });413 WebKit::toImpl(dataStoreRef)->setMaxStatisticsEntries(entries, []() { }); 413 414 #endif 414 415 } … … 417 418 { 418 419 #if ENABLE(RESOURCE_LOAD_STATISTICS) 419 WebKit::toImpl(dataStoreRef)-> websiteDataStore().setPruneEntriesDownTo(entries, []() { });420 WebKit::toImpl(dataStoreRef)->setPruneEntriesDownTo(entries, []() { }); 420 421 #endif 421 422 } … … 424 425 { 425 426 #if ENABLE(RESOURCE_LOAD_STATISTICS) 426 WebKit::toImpl(dataStoreRef)-> websiteDataStore().scheduleClearInMemoryAndPersistent(WebKit::ShouldGrandfatherStatistics::Yes, [context, callback]() {427 WebKit::toImpl(dataStoreRef)->scheduleClearInMemoryAndPersistent(WebKit::ShouldGrandfatherStatistics::Yes, [context, callback]() { 427 428 callback(context); 428 429 }); … … 435 436 { 436 437 #if ENABLE(RESOURCE_LOAD_STATISTICS) 437 WebKit::toImpl(dataStoreRef)-> websiteDataStore().scheduleClearInMemoryAndPersistent(WallTime::now() - Seconds::fromHours(hours), WebKit::ShouldGrandfatherStatistics::Yes, [context, callback]() {438 WebKit::toImpl(dataStoreRef)->scheduleClearInMemoryAndPersistent(WallTime::now() - Seconds::fromHours(hours), WebKit::ShouldGrandfatherStatistics::Yes, [context, callback]() { 438 439 callback(context); 439 440 }); … … 446 447 { 447 448 OptionSet<WebKit::WebsiteDataType> dataTypes = WebKit::WebsiteDataType::ResourceLoadStatistics; 448 WebKit::toImpl(dataStoreRef)-> websiteDataStore().removeData(dataTypes, WallTime::fromRawSeconds(0), [context, callback] {449 WebKit::toImpl(dataStoreRef)->removeData(dataTypes, WallTime::fromRawSeconds(0), [context, callback] { 449 450 callback(context); 450 451 }); … … 454 455 { 455 456 #if ENABLE(RESOURCE_LOAD_STATISTICS) 456 WebKit::toImpl(dataStoreRef)-> websiteDataStore().deleteCookiesForTesting(URL(URL(), WebKit::toImpl(host)->string()), includeHttpOnlyCookies, [context, callback] {457 WebKit::toImpl(dataStoreRef)->deleteCookiesForTesting(URL(URL(), WebKit::toImpl(host)->string()), includeHttpOnlyCookies, [context, callback] { 457 458 callback(context); 458 459 }); … … 465 466 { 466 467 #if ENABLE(RESOURCE_LOAD_STATISTICS) 467 WebKit::toImpl(dataStoreRef)-> websiteDataStore().hasLocalStorageForTesting(URL(URL(), WebKit::toImpl(host)->string()), [context, callback](bool hasLocalStorage) {468 WebKit::toImpl(dataStoreRef)->hasLocalStorageForTesting(URL(URL(), WebKit::toImpl(host)->string()), [context, callback](bool hasLocalStorage) { 468 469 callback(hasLocalStorage, context); 469 470 }); … … 476 477 { 477 478 #if ENABLE(RESOURCE_LOAD_STATISTICS) 478 WebKit::toImpl(dataStoreRef)-> websiteDataStore().setCacheMaxAgeCapForPrevalentResources(Seconds { seconds }, [context, callback] {479 WebKit::toImpl(dataStoreRef)->setCacheMaxAgeCapForPrevalentResources(Seconds { seconds }, [context, callback] { 479 480 callback(context); 480 481 }); … … 487 488 { 488 489 #if ENABLE(RESOURCE_LOAD_STATISTICS) 489 WebKit::toImpl(dataStoreRef)-> websiteDataStore().hasIsolatedSessionForTesting(URL(URL(), WebKit::toImpl(host)->string()), [context, callback](bool hasIsolatedSession) {490 WebKit::toImpl(dataStoreRef)->hasIsolatedSessionForTesting(URL(URL(), WebKit::toImpl(host)->string()), [context, callback](bool hasIsolatedSession) { 490 491 callback(hasIsolatedSession, context); 491 492 }); … … 502 503 }); 503 504 504 auto& store = WebKit::toImpl(dataStoreRef)->websiteDataStore();505 auto& store = *WebKit::toImpl(dataStoreRef); 505 506 store.clearResourceLoadStatisticsInWebProcesses([callbackAggregator = callbackAggregator.copyRef()] { }); 506 507 store.resetCacheMaxAgeCapForPrevalentResources([callbackAggregator = callbackAggregator.copyRef()] { }); … … 517 518 { 518 519 OptionSet<WebKit::WebsiteDataType> dataTypes = WebKit::WebsiteDataType::DOMCache; 519 WebKit::toImpl(dataStoreRef)-> websiteDataStore().removeData(dataTypes, -WallTime::infinity(), [context, callback] {520 WebKit::toImpl(dataStoreRef)->removeData(dataTypes, -WallTime::infinity(), [context, callback] { 520 521 callback(context); 521 522 }); … … 529 530 530 531 OptionSet<WebKit::WebsiteDataType> dataTypes = WebKit::WebsiteDataType::DOMCache; 531 WebKit::toImpl(dataStoreRef)-> websiteDataStore().removeData(dataTypes, dataRecords, [context, callback] {532 WebKit::toImpl(dataStoreRef)->removeData(dataTypes, dataRecords, [context, callback] { 532 533 callback(context); 533 534 }); … … 537 538 { 538 539 OptionSet<WebKit::WebsiteDataType> dataTypes = WebKit::WebsiteDataType::IndexedDBDatabases; 539 WebKit::toImpl(dataStoreRef)-> websiteDataStore().removeData(dataTypes, -WallTime::infinity(), [context, callback] {540 WebKit::toImpl(dataStoreRef)->removeData(dataTypes, -WallTime::infinity(), [context, callback] { 540 541 if (callback) 541 542 callback(context); … … 546 547 { 547 548 OptionSet<WebKit::WebsiteDataType> dataTypes = WebKit::WebsiteDataType::LocalStorage; 548 WebKit::toImpl(dataStoreRef)-> websiteDataStore().removeData(dataTypes, -WallTime::infinity(), [context, callback] {549 WebKit::toImpl(dataStoreRef)->removeData(dataTypes, -WallTime::infinity(), [context, callback] { 549 550 if (callback) 550 551 callback(context); … … 556 557 #if ENABLE(SERVICE_WORKER) 557 558 OptionSet<WebKit::WebsiteDataType> dataTypes = WebKit::WebsiteDataType::ServiceWorkerRegistrations; 558 WebKit::toImpl(dataStoreRef)-> websiteDataStore().removeData(dataTypes, -WallTime::infinity(), [context, callback] {559 WebKit::toImpl(dataStoreRef)->removeData(dataTypes, -WallTime::infinity(), [context, callback] { 559 560 callback(context); 560 561 }); … … 567 568 void WKWebsiteDataStoreGetFetchCacheOrigins(WKWebsiteDataStoreRef dataStoreRef, void* context, WKWebsiteDataStoreGetFetchCacheOriginsFunction callback) 568 569 { 569 WebKit::toImpl(dataStoreRef)-> websiteDataStore().fetchData(WebKit::WebsiteDataType::DOMCache, { }, [context, callback] (auto dataRecords) {570 WebKit::toImpl(dataStoreRef)->fetchData(WebKit::WebsiteDataType::DOMCache, { }, [context, callback] (auto dataRecords) { 570 571 Vector<RefPtr<API::Object>> securityOrigins; 571 572 for (const auto& dataRecord : dataRecords) { … … 581 582 OptionSet<WebKit::WebsiteDataFetchOption> fetchOptions = WebKit::WebsiteDataFetchOption::ComputeSizes; 582 583 583 WebKit::toImpl(dataStoreRef)-> websiteDataStore().fetchData(WebKit::WebsiteDataType::DOMCache, fetchOptions, [origin, context, callback] (auto dataRecords) {584 WebKit::toImpl(dataStoreRef)->fetchData(WebKit::WebsiteDataType::DOMCache, fetchOptions, [origin, context, callback] (auto dataRecords) { 584 585 auto originData = WebCore::SecurityOrigin::createFromString(WebKit::toImpl(origin)->string())->data(); 585 586 for (auto& dataRecord : dataRecords) { … … 598 599 WKStringRef WKWebsiteDataStoreCopyServiceWorkerRegistrationDirectory(WKWebsiteDataStoreRef dataStoreRef) 599 600 { 600 return WebKit::toCopiedAPI(WebKit::toImpl(dataStoreRef)-> websiteDataStore().serviceWorkerRegistrationDirectory());601 return WebKit::toCopiedAPI(WebKit::toImpl(dataStoreRef)->serviceWorkerRegistrationDirectory()); 601 602 } 602 603 603 604 void WKWebsiteDataStoreSetServiceWorkerRegistrationDirectory(WKWebsiteDataStoreRef dataStoreRef, WKStringRef serviceWorkerRegistrationDirectory) 604 605 { 605 WebKit::toImpl(dataStoreRef)-> websiteDataStore().setServiceWorkerRegistrationDirectory(WebKit::toImpl(serviceWorkerRegistrationDirectory)->string());606 WebKit::toImpl(dataStoreRef)->setServiceWorkerRegistrationDirectory(WebKit::toImpl(serviceWorkerRegistrationDirectory)->string()); 606 607 } 607 608 … … 613 614 { 614 615 #if ENABLE(DEVICE_ORIENTATION) 615 WebKit::toImpl(dataStoreRef)-> websiteDataStore().deviceOrientationAndMotionAccessController().clearPermissions();616 WebKit::toImpl(dataStoreRef)->deviceOrientationAndMotionAccessController().clearPermissions(); 616 617 #endif 617 618 } … … 713 714 } 714 715 715 WebKit::toImpl(dataStoreRef)-> websiteDataStore().setMockWebAuthenticationConfiguration(WTFMove(configuration));716 WebKit::toImpl(dataStoreRef)->setMockWebAuthenticationConfiguration(WTFMove(configuration)); 716 717 #endif 717 718 } … … 720 721 { 721 722 OptionSet<WebKit::WebsiteDataType> dataTypes = WebKit::WebsiteDataType::AdClickAttributions; 722 WebKit::toImpl(dataStoreRef)-> websiteDataStore().removeData(dataTypes, WallTime::fromRawSeconds(0), [context, callback] {723 callback(context); 724 }); 725 } 726 723 WebKit::toImpl(dataStoreRef)->removeData(dataTypes, WallTime::fromRawSeconds(0), [context, callback] { 724 callback(context); 725 }); 726 } 727 -
trunk/Source/WebKit/UIProcess/API/C/WKWebsitePolicies.cpp
r249778 r250169 28 28 29 29 #include "APIDictionary.h" 30 #include "APIWebsiteDataStore.h"31 30 #include "APIWebsitePolicies.h" 32 31 #include "WKAPICast.h" … … 34 33 #include "WKDictionary.h" 35 34 #include "WKRetainPtr.h" 35 #include "WebsiteDataStore.h" 36 36 37 37 using namespace WebKit; -
trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm
r250150 r250169 106 106 + (WKWebsiteDataStore *)defaultDataStore 107 107 { 108 return wrapper( API::WebsiteDataStore::defaultDataStore());108 return wrapper(WebKit::WebsiteDataStore::defaultDataStore()); 109 109 } 110 110 111 111 + (WKWebsiteDataStore *)nonPersistentDataStore 112 112 { 113 return wrapper( API::WebsiteDataStore::createNonPersistentDataStore());113 return wrapper(WebKit::WebsiteDataStore::createNonPersistent()); 114 114 } 115 115 116 116 - (void)dealloc 117 117 { 118 _websiteDataStore-> API::WebsiteDataStore::~WebsiteDataStore();118 _websiteDataStore->WebKit::WebsiteDataStore::~WebsiteDataStore(); 119 119 120 120 [super dealloc]; … … 128 128 - (instancetype)initWithCoder:(NSCoder *)coder 129 129 { 130 if (!(self = [super init]))131 return nil;132 133 RetainPtr<WKWebsiteDataStore> dataStore;134 130 if ([coder decodeBoolForKey:@"isDefaultDataStore"]) 135 dataStore = [WKWebsiteDataStore defaultDataStore]; 136 else 137 dataStore = [WKWebsiteDataStore nonPersistentDataStore]; 138 139 [self release]; 140 141 return dataStore.leakRef(); 131 return [[WKWebsiteDataStore defaultDataStore] retain]; 132 return [[WKWebsiteDataStore nonPersistentDataStore] retain]; 142 133 } 143 134 … … 170 161 - (WKHTTPCookieStore *)httpCookieStore 171 162 { 172 return wrapper(_websiteDataStore-> httpCookieStore());163 return wrapper(_websiteDataStore->cookieStore()); 173 164 } 174 165 … … 187 178 { 188 179 auto completionHandlerCopy = makeBlockPtr(completionHandler); 189 _websiteDataStore-> websiteDataStore().removeData(WebKit::toWebsiteDataTypes(dataTypes), toSystemClockTime(date ? date : [NSDate distantPast]), [completionHandlerCopy] {180 _websiteDataStore->removeData(WebKit::toWebsiteDataTypes(dataTypes), toSystemClockTime(date ? date : [NSDate distantPast]), [completionHandlerCopy] { 190 181 completionHandlerCopy(); 191 182 }); … … 206 197 auto completionHandlerCopy = makeBlockPtr(completionHandler); 207 198 208 _websiteDataStore-> websiteDataStore().removeData(WebKit::toWebsiteDataTypes(dataTypes), toWebsiteDataRecords(dataRecords), [completionHandlerCopy] {199 _websiteDataStore->removeData(WebKit::toWebsiteDataTypes(dataTypes), toWebsiteDataRecords(dataRecords), [completionHandlerCopy] { 209 200 completionHandlerCopy(); 210 201 }); … … 241 232 + (BOOL)_defaultDataStoreExists 242 233 { 243 return API::WebsiteDataStore::defaultDataStoreExists();234 return WebKit::WebsiteDataStore::defaultDataStoreExists(); 244 235 } 245 236 246 237 + (void)_deleteDefaultDataStoreForTesting 247 238 { 248 return API::WebsiteDataStore::deleteDefaultDataStoreForTesting();239 return WebKit::WebsiteDataStore::deleteDefaultDataStoreForTesting(); 249 240 } 250 241 … … 254 245 return nil; 255 246 256 auto config = configuration.isPersistent ? API::WebsiteDataStore::defaultDataStoreConfiguration() : WebKit::WebsiteDataStoreConfiguration::create();247 auto config = configuration.isPersistent ? WebKit::WebsiteDataStore::defaultDataStoreConfiguration() : WebKit::WebsiteDataStoreConfiguration::create(); 257 248 258 249 RELEASE_ASSERT(config->isPersistent() == configuration.isPersistent); … … 318 309 auto sessionID = configuration.isPersistent ? PAL::SessionID::generatePersistentSessionID() : PAL::SessionID::generateEphemeralSessionID(); 319 310 320 API::Object::constructInWrapper< API::WebsiteDataStore>(self, WTFMove(config), sessionID);311 API::Object::constructInWrapper<WebKit::WebsiteDataStore>(self, WTFMove(config), sessionID); 321 312 322 313 return self; … … 331 322 fetchOptions.add(WebKit::WebsiteDataFetchOption::ComputeSizes); 332 323 333 _websiteDataStore-> websiteDataStore().fetchData(WebKit::toWebsiteDataTypes(dataTypes), fetchOptions, [completionHandlerCopy = WTFMove(completionHandlerCopy)](auto websiteDataRecords) {324 _websiteDataStore->fetchData(WebKit::toWebsiteDataTypes(dataTypes), fetchOptions, [completionHandlerCopy = WTFMove(completionHandlerCopy)](auto websiteDataRecords) { 334 325 Vector<RefPtr<API::Object>> elements; 335 326 elements.reserveInitialCapacity(websiteDataRecords.size()); … … 344 335 - (BOOL)_resourceLoadStatisticsEnabled 345 336 { 346 return _websiteDataStore-> websiteDataStore().resourceLoadStatisticsEnabled();337 return _websiteDataStore->resourceLoadStatisticsEnabled(); 347 338 } 348 339 349 340 - (void)_setResourceLoadStatisticsEnabled:(BOOL)enabled 350 341 { 351 _websiteDataStore-> websiteDataStore().setResourceLoadStatisticsEnabled(enabled);342 _websiteDataStore->setResourceLoadStatisticsEnabled(enabled); 352 343 } 353 344 … … 355 346 { 356 347 #if ENABLE(RESOURCE_LOAD_STATISTICS) 357 return _websiteDataStore-> websiteDataStore().resourceLoadStatisticsDebugMode();348 return _websiteDataStore->resourceLoadStatisticsDebugMode(); 358 349 #else 359 350 return NO; … … 364 355 { 365 356 #if ENABLE(RESOURCE_LOAD_STATISTICS) 366 _websiteDataStore-> websiteDataStore().setResourceLoadStatisticsDebugMode(enabled);357 _websiteDataStore->setResourceLoadStatisticsDebugMode(enabled); 367 358 #else 368 359 UNUSED_PARAM(enabled); … … 381 372 - (NSString *)_cacheStorageDirectory 382 373 { 383 return _websiteDataStore-> websiteDataStore().cacheStorageDirectory();374 return _websiteDataStore->cacheStorageDirectory(); 384 375 } 385 376 386 377 - (void)_setCacheStorageDirectory:(NSString *)directory 387 378 { 388 _websiteDataStore-> websiteDataStore().setCacheStorageDirectory(directory);379 _websiteDataStore->setCacheStorageDirectory(directory); 389 380 } 390 381 391 382 - (NSString *)_serviceWorkerRegistrationDirectory 392 383 { 393 return _websiteDataStore-> websiteDataStore().serviceWorkerRegistrationDirectory();384 return _websiteDataStore->serviceWorkerRegistrationDirectory(); 394 385 } 395 386 396 387 - (void)_setServiceWorkerRegistrationDirectory:(NSString *)directory 397 388 { 398 _websiteDataStore-> websiteDataStore().setServiceWorkerRegistrationDirectory(directory);389 _websiteDataStore->setServiceWorkerRegistrationDirectory(directory); 399 390 } 400 391 401 392 - (void)_setBoundInterfaceIdentifier:(NSString *)identifier 402 393 { 403 _websiteDataStore-> websiteDataStore().setBoundInterfaceIdentifier(identifier);394 _websiteDataStore->setBoundInterfaceIdentifier(identifier); 404 395 } 405 396 406 397 - (NSString *)_boundInterfaceIdentifier 407 398 { 408 return _websiteDataStore-> websiteDataStore().boundInterfaceIdentifier();399 return _websiteDataStore->boundInterfaceIdentifier(); 409 400 } 410 401 411 402 - (void)_setAllowsCellularAccess:(BOOL)allows 412 403 { 413 _websiteDataStore-> websiteDataStore().setAllowsCellularAccess(allows ? WebKit::AllowsCellularAccess::Yes : WebKit::AllowsCellularAccess::No);404 _websiteDataStore->setAllowsCellularAccess(allows ? WebKit::AllowsCellularAccess::Yes : WebKit::AllowsCellularAccess::No); 414 405 } 415 406 416 407 - (BOOL)_allowsCellularAccess 417 408 { 418 return _websiteDataStore-> websiteDataStore().allowsCellularAccess() == WebKit::AllowsCellularAccess::Yes;409 return _websiteDataStore->allowsCellularAccess() == WebKit::AllowsCellularAccess::Yes; 419 410 } 420 411 421 412 - (void)_setProxyConfiguration:(NSDictionary *)configuration 422 413 { 423 _websiteDataStore-> websiteDataStore().setProxyConfiguration((__bridge CFDictionaryRef)configuration);414 _websiteDataStore->setProxyConfiguration((__bridge CFDictionaryRef)configuration); 424 415 } 425 416 426 417 - (NSString *)_sourceApplicationBundleIdentifier 427 418 { 428 return _websiteDataStore-> websiteDataStore().sourceApplicationBundleIdentifier();419 return _websiteDataStore->sourceApplicationBundleIdentifier(); 429 420 } 430 421 431 422 - (void)_setSourceApplicationBundleIdentifier:(NSString *)identifier 432 423 { 433 if (!_websiteDataStore-> websiteDataStore().setSourceApplicationBundleIdentifier(identifier))424 if (!_websiteDataStore->setSourceApplicationBundleIdentifier(identifier)) 434 425 [NSException raise:NSGenericException format:@"_setSourceApplicationBundleIdentifier cannot be called after networking has begun"]; 435 426 } … … 437 428 - (NSString *)_sourceApplicationSecondaryIdentifier 438 429 { 439 return _websiteDataStore-> websiteDataStore().sourceApplicationSecondaryIdentifier();430 return _websiteDataStore->sourceApplicationSecondaryIdentifier(); 440 431 } 441 432 442 433 - (void)_setSourceApplicationSecondaryIdentifier:(NSString *)identifier 443 434 { 444 if (!_websiteDataStore-> websiteDataStore().setSourceApplicationSecondaryIdentifier(identifier))435 if (!_websiteDataStore->setSourceApplicationSecondaryIdentifier(identifier)) 445 436 [NSException raise:NSGenericException format:@"_setSourceApplicationSecondaryIdentifier cannot be called after networking has begun"]; 446 437 } … … 457 448 - (NSDictionary *)_proxyConfiguration 458 449 { 459 return (__bridge NSDictionary *)_websiteDataStore-> websiteDataStore().proxyConfiguration();450 return (__bridge NSDictionary *)_websiteDataStore->proxyConfiguration(); 460 451 } 461 452 462 453 - (NSURL *)_indexedDBDatabaseDirectory 463 454 { 464 return [NSURL fileURLWithPath:_websiteDataStore-> indexedDBDatabaseDirectory() isDirectory:YES];455 return [NSURL fileURLWithPath:_websiteDataStore->configuration().indexedDBDatabaseDirectory() isDirectory:YES]; 465 456 } 466 457 … … 468 459 { 469 460 #if ENABLE(RESOURCE_LOAD_STATISTICS) 470 auto* store = _websiteDataStore-> websiteDataStore().resourceLoadStatistics();461 auto* store = _websiteDataStore->resourceLoadStatistics(); 471 462 if (!store) 472 463 return; … … 483 474 484 475 if (callback) { 485 _websiteDataStore-> websiteDataStore().setStatisticsTestingCallback([callback = makeBlockPtr(callback), self](const String& event) {476 _websiteDataStore->setStatisticsTestingCallback([callback = makeBlockPtr(callback), self](const String& event) { 486 477 callback(self, event); 487 478 }); … … 489 480 } 490 481 491 _websiteDataStore-> websiteDataStore().setStatisticsTestingCallback(nullptr);482 _websiteDataStore->setStatisticsTestingCallback(nullptr); 492 483 #endif 493 484 } … … 512 503 513 504 #if ENABLE(RESOURCE_LOAD_STATISTICS) 514 _websiteDataStore-> websiteDataStore().getAllStorageAccessEntries(webPageProxy->identifier(), [completionHandler = makeBlockPtr(completionHandler)](auto domains) {505 _websiteDataStore->getAllStorageAccessEntries(webPageProxy->identifier(), [completionHandler = makeBlockPtr(completionHandler)](auto domains) { 515 506 Vector<RefPtr<API::Object>> apiDomains; 516 507 apiDomains.reserveInitialCapacity(domains.size()); … … 527 518 { 528 519 #if ENABLE(RESOURCE_LOAD_STATISTICS) 529 _websiteDataStore-> websiteDataStore().scheduleCookieBlockingUpdate([completionHandler = makeBlockPtr(completionHandler)]() {520 _websiteDataStore->scheduleCookieBlockingUpdate([completionHandler = makeBlockPtr(completionHandler)]() { 530 521 completionHandler(); 531 522 }); … … 538 529 { 539 530 #if ENABLE(RESOURCE_LOAD_STATISTICS) 540 _websiteDataStore-> websiteDataStore().setPrevalentResource(URL(domain), [completionHandler = makeBlockPtr(completionHandler)]() {531 _websiteDataStore->setPrevalentResource(URL(domain), [completionHandler = makeBlockPtr(completionHandler)]() { 541 532 completionHandler(); 542 533 }); … … 549 540 { 550 541 #if ENABLE(RESOURCE_LOAD_STATISTICS) 551 _websiteDataStore-> websiteDataStore().isPrevalentResource(URL(domain), [completionHandler = makeBlockPtr(completionHandler)](bool enabled) {542 _websiteDataStore->isPrevalentResource(URL(domain), [completionHandler = makeBlockPtr(completionHandler)](bool enabled) { 552 543 completionHandler(enabled); 553 544 }); … … 560 551 { 561 552 #if ENABLE(RESOURCE_LOAD_STATISTICS) 562 _websiteDataStore-> websiteDataStore().clearPrevalentResource(URL(domain), [completionHandler = makeBlockPtr(completionHandler)]() {553 _websiteDataStore->clearPrevalentResource(URL(domain), [completionHandler = makeBlockPtr(completionHandler)]() { 563 554 completionHandler(); 564 555 }); … … 571 562 { 572 563 #if ENABLE(RESOURCE_LOAD_STATISTICS) 573 _websiteDataStore-> websiteDataStore().scheduleStatisticsAndDataRecordsProcessing([completionHandler = makeBlockPtr(completionHandler)]() {564 _websiteDataStore->scheduleStatisticsAndDataRecordsProcessing([completionHandler = makeBlockPtr(completionHandler)]() { 574 565 completionHandler(); 575 566 }); … … 581 572 - (bool)_hasRegisteredServiceWorker 582 573 { 583 return FileSystem::fileExists(WebCore::serviceWorkerRegistrationDatabaseFilename(_websiteDataStore-> websiteDataStore().serviceWorkerRegistrationDirectory()));574 return FileSystem::fileExists(WebCore::serviceWorkerRegistrationDatabaseFilename(_websiteDataStore->serviceWorkerRegistrationDirectory())); 584 575 } 585 576 586 577 - (id <_WKWebsiteDataStoreDelegate>)_delegate 587 578 { 588 return _delegate.get() ;579 return _delegate.get().get(); 589 580 } 590 581 … … 592 583 { 593 584 _delegate = delegate; 594 _websiteDataStore-> websiteDataStore().setClient(makeUniqueRef<WebsiteDataStoreClient>(delegate));585 _websiteDataStore->setClient(makeUniqueRef<WebsiteDataStoreClient>(delegate)); 595 586 } 596 587 -
trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStoreInternal.h
r249778 r250169 26 26 #import "WKWebsiteDataStorePrivate.h" 27 27 28 #import "APIWebsiteDataStore.h"29 28 #import "WKObject.h" 29 #import "WebsiteDataStore.h" 30 #import <wtf/WeakObjCPtr.h> 30 31 31 32 namespace WebKit { 32 33 33 template<> struct WrapperTraits< API::WebsiteDataStore> {34 template<> struct WrapperTraits<WebsiteDataStore> { 34 35 using WrapperClass = WKWebsiteDataStore; 35 36 }; … … 39 40 @interface WKWebsiteDataStore () <WKObject> { 40 41 @package 41 API::ObjectStorage< API::WebsiteDataStore> _websiteDataStore;42 RetainPtr<id <_WKWebsiteDataStoreDelegate> > _delegate;42 API::ObjectStorage<WebKit::WebsiteDataStore> _websiteDataStore; 43 WeakObjCPtr<id <_WKWebsiteDataStoreDelegate> > _delegate; 43 44 } 44 45 @end -
trunk/Source/WebKit/UIProcess/API/glib/WebKitCookieManager.cpp
r249778 r250169 59 59 { 60 60 ASSERT(dataManager); 61 return webkitWebsiteDataManagerGetDataStore(dataManager). websiteDataStore().sessionID();61 return webkitWebsiteDataManagerGetDataStore(dataManager).sessionID(); 62 62 } 63 63 -
trunk/Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp
r250148 r250169 756 756 websiteDataTypes.add(WebsiteDataType::MemoryCache); 757 757 websiteDataTypes.add(WebsiteDataType::DiskCache); 758 auto& websiteDataStore = webkitWebsiteDataManagerGetDataStore(context->priv->websiteDataManager.get()) .websiteDataStore();758 auto& websiteDataStore = webkitWebsiteDataManagerGetDataStore(context->priv->websiteDataManager.get()); 759 759 websiteDataStore.removeData(websiteDataTypes, -WallTime::infinity(), [] { }); 760 760 } -
trunk/Source/WebKit/UIProcess/API/glib/WebKitWebsiteDataManager.cpp
r249778 r250169 21 21 #include "WebKitWebsiteDataManager.h" 22 22 23 #include "APIWebsiteDataStore.h"24 23 #include "WebKitCookieManagerPrivate.h" 25 24 #include "WebKitPrivate.h" … … 27 26 #include "WebKitWebsiteDataPrivate.h" 28 27 #include "WebsiteDataFetchOption.h" 28 #include "WebsiteDataStore.h" 29 29 #include <glib/gi18n-lib.h> 30 30 #include <pal/SessionID.h> … … 96 96 } 97 97 98 RefPtr< API::WebsiteDataStore> websiteDataStore;98 RefPtr<WebKit::WebsiteDataStore> websiteDataStore; 99 99 GUniquePtr<char> baseDataDirectory; 100 100 GUniquePtr<char> baseCacheDirectory; … … 182 182 case PROP_IS_EPHEMERAL: 183 183 if (g_value_get_boolean(value)) 184 manager->priv->websiteDataStore = API::WebsiteDataStore::createNonPersistentDataStore();184 manager->priv->websiteDataStore = WebKit::WebsiteDataStore::createNonPersistent(); 185 185 break; 186 186 default: … … 382 382 } 383 383 384 WebKitWebsiteDataManager* webkitWebsiteDataManagerCreate(Ref<WebsiteDataStoreConfiguration>&& configuration) 385 { 386 WebKitWebsiteDataManager* manager = WEBKIT_WEBSITE_DATA_MANAGER(g_object_new(WEBKIT_TYPE_WEBSITE_DATA_MANAGER, nullptr)); 387 manager->priv->websiteDataStore = API::WebsiteDataStore::create(WTFMove(configuration), PAL::SessionID::defaultSessionID()); 388 389 return manager; 390 } 391 392 API::WebsiteDataStore& webkitWebsiteDataManagerGetDataStore(WebKitWebsiteDataManager* manager) 384 WebKit::WebsiteDataStore& webkitWebsiteDataManagerGetDataStore(WebKitWebsiteDataManager* manager) 393 385 { 394 386 WebKitWebsiteDataManagerPrivate* priv = manager->priv; … … 396 388 auto configuration = WebsiteDataStoreConfiguration::create(); 397 389 configuration->setLocalStorageDirectory(!priv->localStorageDirectory ? 398 API::WebsiteDataStore::defaultLocalStorageDirectory() : FileSystem::stringFromFileSystemRepresentation(priv->localStorageDirectory.get()));390 WebKit::WebsiteDataStore::defaultLocalStorageDirectory() : FileSystem::stringFromFileSystemRepresentation(priv->localStorageDirectory.get())); 399 391 configuration->setNetworkCacheDirectory(!priv->diskCacheDirectory ? 400 API::WebsiteDataStore::defaultNetworkCacheDirectory() : FileSystem::pathByAppendingComponent(FileSystem::stringFromFileSystemRepresentation(priv->diskCacheDirectory.get()), networkCacheSubdirectory));392 WebKit::WebsiteDataStore::defaultNetworkCacheDirectory() : FileSystem::pathByAppendingComponent(FileSystem::stringFromFileSystemRepresentation(priv->diskCacheDirectory.get()), networkCacheSubdirectory)); 401 393 configuration->setApplicationCacheDirectory(!priv->applicationCacheDirectory ? 402 API::WebsiteDataStore::defaultApplicationCacheDirectory() : FileSystem::stringFromFileSystemRepresentation(priv->applicationCacheDirectory.get()));394 WebKit::WebsiteDataStore::defaultApplicationCacheDirectory() : FileSystem::stringFromFileSystemRepresentation(priv->applicationCacheDirectory.get())); 403 395 configuration->setWebSQLDatabaseDirectory(!priv->webSQLDirectory ? 404 API::WebsiteDataStore::defaultWebSQLDatabaseDirectory() : FileSystem::stringFromFileSystemRepresentation(priv->webSQLDirectory.get()));396 WebKit::WebsiteDataStore::defaultWebSQLDatabaseDirectory() : FileSystem::stringFromFileSystemRepresentation(priv->webSQLDirectory.get())); 405 397 configuration->setHSTSStorageDirectory(!priv->hstsCacheDirectory ? 406 API::WebsiteDataStore::defaultHSTSDirectory() : FileSystem::stringFromFileSystemRepresentation(priv->hstsCacheDirectory.get()));407 configuration->setMediaKeysStorageDirectory( API::WebsiteDataStore::defaultMediaKeysStorageDirectory());408 priv->websiteDataStore = API::WebsiteDataStore::create(WTFMove(configuration), PAL::SessionID::defaultSessionID());398 WebKit::WebsiteDataStore::defaultHSTSDirectory() : FileSystem::stringFromFileSystemRepresentation(priv->hstsCacheDirectory.get())); 399 configuration->setMediaKeysStorageDirectory(WebKit::WebsiteDataStore::defaultMediaKeysStorageDirectory()); 400 priv->websiteDataStore = WebKit::WebsiteDataStore::create(WTFMove(configuration), PAL::SessionID::defaultSessionID()); 409 401 } 410 402 … … 543 535 544 536 if (!priv->localStorageDirectory) 545 priv->localStorageDirectory.reset(g_strdup( API::WebsiteDataStore::defaultLocalStorageDirectory().utf8().data()));537 priv->localStorageDirectory.reset(g_strdup(WebKit::WebsiteDataStore::defaultLocalStorageDirectory().utf8().data())); 546 538 return priv->localStorageDirectory.get(); 547 539 } … … 567 559 if (!priv->diskCacheDirectory) { 568 560 // The default directory already has the subdirectory. 569 priv->diskCacheDirectory.reset(g_strdup(FileSystem::directoryName( API::WebsiteDataStore::defaultNetworkCacheDirectory()).utf8().data()));561 priv->diskCacheDirectory.reset(g_strdup(FileSystem::directoryName(WebKit::WebsiteDataStore::defaultNetworkCacheDirectory()).utf8().data())); 570 562 } 571 563 return priv->diskCacheDirectory.get(); … … 591 583 592 584 if (!priv->applicationCacheDirectory) 593 priv->applicationCacheDirectory.reset(g_strdup( API::WebsiteDataStore::defaultApplicationCacheDirectory().utf8().data()));585 priv->applicationCacheDirectory.reset(g_strdup(WebKit::WebsiteDataStore::defaultApplicationCacheDirectory().utf8().data())); 594 586 return priv->applicationCacheDirectory.get(); 595 587 } … … 614 606 615 607 if (!priv->indexedDBDirectory) 616 priv->indexedDBDirectory.reset(g_strdup( API::WebsiteDataStore::defaultIndexedDBDatabaseDirectory().utf8().data()));608 priv->indexedDBDirectory.reset(g_strdup(WebKit::WebsiteDataStore::defaultIndexedDBDatabaseDirectory().utf8().data())); 617 609 return priv->indexedDBDirectory.get(); 618 610 } … … 639 631 640 632 if (!priv->webSQLDirectory) 641 priv->webSQLDirectory.reset(g_strdup( API::WebsiteDataStore::defaultWebSQLDatabaseDirectory().utf8().data()));633 priv->webSQLDirectory.reset(g_strdup(WebKit::WebsiteDataStore::defaultWebSQLDatabaseDirectory().utf8().data())); 642 634 return priv->webSQLDirectory.get(); 643 635 } … … 662 654 663 655 if (!priv->hstsCacheDirectory) 664 priv->hstsCacheDirectory.reset(g_strdup( API::WebsiteDataStore::defaultHSTSDirectory().utf8().data()));656 priv->hstsCacheDirectory.reset(g_strdup(WebKit::WebsiteDataStore::defaultHSTSDirectory().utf8().data())); 665 657 return priv->hstsCacheDirectory.get(); 666 658 } … … 736 728 737 729 GRefPtr<GTask> task = adoptGRef(g_task_new(manager, cancellable, callback, userData)); 738 manager->priv->websiteDataStore-> websiteDataStore().fetchData(toWebsiteDataTypes(types), WebsiteDataFetchOption::ComputeSizes, [task = WTFMove(task)] (Vector<WebsiteDataRecord> records) {730 manager->priv->websiteDataStore->fetchData(toWebsiteDataTypes(types), WebsiteDataFetchOption::ComputeSizes, [task = WTFMove(task)] (Vector<WebsiteDataRecord> records) { 739 731 GList* dataList = nullptr; 740 732 while (!records.isEmpty()) { … … 810 802 } 811 803 812 manager->priv->websiteDataStore-> websiteDataStore().removeData(toWebsiteDataTypes(types), records, [task = WTFMove(task)] {804 manager->priv->websiteDataStore->removeData(toWebsiteDataTypes(types), records, [task = WTFMove(task)] { 813 805 g_task_return_boolean(task.get(), TRUE); 814 806 }); … … 862 854 WallTime timePoint = timeSpan ? WallTime::now() - Seconds::fromMicroseconds(timeSpan) : WallTime::fromRawSeconds(0); 863 855 GRefPtr<GTask> task = adoptGRef(g_task_new(manager, cancellable, callback, userData)); 864 manager->priv->websiteDataStore-> websiteDataStore().removeData(toWebsiteDataTypes(types), timePoint, [task = WTFMove(task)] {856 manager->priv->websiteDataStore->removeData(toWebsiteDataTypes(types), timePoint, [task = WTFMove(task)] { 865 857 g_task_return_boolean(task.get(), TRUE); 866 858 }); -
trunk/Source/WebKit/UIProcess/API/glib/WebKitWebsiteDataManagerPrivate.h
r249778 r250169 20 20 #pragma once 21 21 22 #include "APIWebsiteDataStore.h"23 22 #include "WebProcessPool.h" 24 23 #include "WebsiteDataStore.h" 25 24 26 WebKitWebsiteDataManager* webkitWebsiteDataManagerCreate(Ref<WebKit::WebsiteDataStoreConfiguration>&&); 27 API::WebsiteDataStore& webkitWebsiteDataManagerGetDataStore(WebKitWebsiteDataManager*); 25 WebKit::WebsiteDataStore& webkitWebsiteDataManagerGetDataStore(WebKitWebsiteDataManager*); 28 26 void webkitWebsiteDataManagerAddProcessPool(WebKitWebsiteDataManager*, WebKit::WebProcessPool&); 29 27 void webkitWebsiteDataManagerRemoveProcessPool(WebKitWebsiteDataManager*, WebKit::WebProcessPool&); -
trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.mm
r249778 r250169 34 34 #import "APIString.h" 35 35 #import "APIURL.h" 36 #import "APIWebsiteDataStore.h"37 36 #import "AuthenticationChallengeDisposition.h" 38 37 #import "AuthenticationChallengeDispositionCocoa.h" … … 65 64 #import "WebProcessProxy.h" 66 65 #import "WebProtectionSpace.h" 66 #import "WebsiteDataStore.h" 67 67 #import "_WKContentRuleListActionInternal.h" 68 68 #import "_WKErrorRecoveryAttempting.h" -
trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp
r249942 r250169 88 88 89 89 if (auto* websiteDataStore = m_processPool.websiteDataStore()) 90 m_websiteDataStores.set(websiteDataStore-> websiteDataStore().sessionID(), makeRef(websiteDataStore->websiteDataStore()));90 m_websiteDataStores.set(websiteDataStore->sessionID(), makeRef(*websiteDataStore)); 91 91 } 92 92 … … 1126 1126 1127 1127 if (auto* websiteDataStore = m_processPool.websiteDataStore()) { 1128 if (sessionID == websiteDataStore-> websiteDataStore().sessionID())1129 return &websiteDataStore->websiteDataStore();1128 if (sessionID == websiteDataStore->sessionID()) 1129 return websiteDataStore; 1130 1130 } 1131 1131 … … 1133 1133 return nullptr; 1134 1134 1135 return &API::WebsiteDataStore::defaultDataStore()->websiteDataStore();1135 return WebKit::WebsiteDataStore::defaultDataStore().ptr(); 1136 1136 } 1137 1137 -
trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.h
r249832 r250169 26 26 #pragma once 27 27 28 #include "APIWebsiteDataStore.h"29 28 #include "AuxiliaryProcessProxy.h" 30 29 #if ENABLE(LEGACY_CUSTOM_PROTOCOL_MANAGER) … … 37 36 #include "UserContentControllerIdentifier.h" 38 37 #include "WebProcessProxyMessages.h" 38 #include "WebsiteDataStore.h" 39 39 #include <WebCore/CrossSiteNavigationDataTransfer.h> 40 40 #include <WebCore/RegistrableDomain.h> -
trunk/Source/WebKit/UIProcess/WebFramePolicyListenerProxy.cpp
r249778 r250169 28 28 29 29 #include "APINavigation.h" 30 #include "APIWebsiteDataStore.h"31 30 #include "APIWebsitePolicies.h" 32 31 #include "SafeBrowsingWarning.h" -
trunk/Source/WebKit/UIProcess/WebPageProxy.cpp
r250157 r250169 417 417 , m_userContentController(*m_configuration->userContentController()) 418 418 , m_visitedLinkStore(*m_configuration->visitedLinkStore()) 419 , m_websiteDataStore( m_configuration->websiteDataStore()->websiteDataStore())419 , m_websiteDataStore(*m_configuration->websiteDataStore()) 420 420 , m_userAgent(standardUserAgent()) 421 421 , m_overrideContentSecurityPolicy { m_configuration->overrideContentSecurityPolicy() } … … 2866 2866 if (policies) { 2867 2867 data = policies->data(); 2868 if (policies->websiteDataStore() && &policies->websiteDataStore()->websiteDataStore() != websiteDataStore.ptr()) {2869 websiteDataStore = policies->websiteDataStore()->websiteDataStore();2868 if (policies->websiteDataStore() && policies->websiteDataStore() != websiteDataStore.ptr()) { 2869 websiteDataStore = *policies->websiteDataStore(); 2870 2870 processSwapRequestedByClient = ProcessSwapRequestedByClient::Yes; 2871 2871 } -
trunk/Source/WebKit/UIProcess/WebProcessPool.cpp
r250148 r250169 245 245 }); 246 246 247 if (!m_websiteDataStore && API::WebsiteDataStore::defaultDataStoreExists())248 m_websiteDataStore = API::WebsiteDataStore::defaultDataStore();247 if (!m_websiteDataStore && WebKit::WebsiteDataStore::defaultDataStoreExists()) 248 m_websiteDataStore = WebKit::WebsiteDataStore::defaultDataStore(); 249 249 250 250 for (auto& scheme : m_configuration->alwaysRevalidatedURLSchemes()) … … 484 484 485 485 if (m_websiteDataStore) { 486 parameters.defaultDataStoreParameters.pendingCookies = copyToVector(m_websiteDataStore-> websiteDataStore().pendingCookies());487 m_websiteDataStore-> websiteDataStore().clearPendingCookies();486 parameters.defaultDataStoreParameters.pendingCookies = copyToVector(m_websiteDataStore->pendingCookies()); 487 m_websiteDataStore->clearPendingCookies(); 488 488 #if PLATFORM(COCOA) 489 parameters.defaultDataStoreParameters.networkSessionParameters.sourceApplicationBundleIdentifier = m_websiteDataStore-> websiteDataStore().sourceApplicationBundleIdentifier();490 parameters.defaultDataStoreParameters.networkSessionParameters.sourceApplicationSecondaryIdentifier = m_websiteDataStore-> websiteDataStore().sourceApplicationSecondaryIdentifier();491 #endif 492 m_websiteDataStore-> websiteDataStore().networkingHasBegun();489 parameters.defaultDataStoreParameters.networkSessionParameters.sourceApplicationBundleIdentifier = m_websiteDataStore->sourceApplicationBundleIdentifier(); 490 parameters.defaultDataStoreParameters.networkSessionParameters.sourceApplicationSecondaryIdentifier = m_websiteDataStore->sourceApplicationSecondaryIdentifier(); 491 #endif 492 m_websiteDataStore->networkingHasBegun(); 493 493 } 494 494 … … 542 542 // IMPORTANT: Do not change the directory structure for indexed databases on disk without first consulting a reviewer from Apple (<rdar://problem/17454712>) 543 543 // ********* 544 if ( API::WebsiteDataStore::defaultDataStoreExists())545 parameters.defaultDataStoreParameters.indexedDatabaseDirectory = API::WebsiteDataStore::defaultDataStore()->websiteDataStore().parameters().indexedDatabaseDirectory;544 if (WebKit::WebsiteDataStore::defaultDataStoreExists()) 545 parameters.defaultDataStoreParameters.indexedDatabaseDirectory = WebKit::WebsiteDataStore::defaultDataStore()->parameters().indexedDatabaseDirectory; 546 546 547 547 if (!parameters.defaultDataStoreParameters.indexedDatabaseDirectory.isEmpty()) { … … 553 553 #if ENABLE(SERVICE_WORKER) 554 554 if (m_websiteDataStore) 555 parameters.serviceWorkerRegistrationDirectory = m_websiteDataStore-> websiteDataStore().resolvedServiceWorkerRegistrationDirectory();555 parameters.serviceWorkerRegistrationDirectory = m_websiteDataStore->resolvedServiceWorkerRegistrationDirectory(); 556 556 if (!parameters.serviceWorkerRegistrationDirectory) 557 parameters.serviceWorkerRegistrationDirectory = API::WebsiteDataStore::defaultServiceWorkerRegistrationDirectory();557 parameters.serviceWorkerRegistrationDirectory = WebKit::WebsiteDataStore::defaultServiceWorkerRegistrationDirectory(); 558 558 SandboxExtension::createHandleForReadWriteDirectory(parameters.serviceWorkerRegistrationDirectory, parameters.serviceWorkerRegistrationDirectoryExtensionHandle); 559 559 … … 564 564 #endif 565 565 566 auto localStorageDirectory = m_websiteDataStore ? m_websiteDataStore-> websiteDataStore().resolvedLocalStorageDirectory() : nullString();566 auto localStorageDirectory = m_websiteDataStore ? m_websiteDataStore->resolvedLocalStorageDirectory() : nullString(); 567 567 if (!localStorageDirectory) 568 localStorageDirectory = API::WebsiteDataStore::defaultLocalStorageDirectory();568 localStorageDirectory = WebKit::WebsiteDataStore::defaultLocalStorageDirectory(); 569 569 parameters.defaultDataStoreParameters.localStorageDirectory = localStorageDirectory; 570 570 SandboxExtension::createHandleForReadWriteDirectory(localStorageDirectory, parameters.defaultDataStoreParameters.localStorageDirectoryExtensionHandle); 571 571 572 572 if (m_websiteDataStore) 573 parameters.defaultDataStoreParameters.networkSessionParameters.resourceLoadStatisticsDirectory = m_websiteDataStore-> websiteDataStore().resolvedResourceLoadStatisticsDirectory();573 parameters.defaultDataStoreParameters.networkSessionParameters.resourceLoadStatisticsDirectory = m_websiteDataStore->resolvedResourceLoadStatisticsDirectory(); 574 574 if (parameters.defaultDataStoreParameters.networkSessionParameters.resourceLoadStatisticsDirectory.isEmpty()) 575 parameters.defaultDataStoreParameters.networkSessionParameters.resourceLoadStatisticsDirectory = API::WebsiteDataStore::defaultResourceLoadStatisticsDirectory();575 parameters.defaultDataStoreParameters.networkSessionParameters.resourceLoadStatisticsDirectory = WebKit::WebsiteDataStore::defaultResourceLoadStatisticsDirectory(); 576 576 577 577 SandboxExtension::createHandleForReadWriteDirectory(parameters.defaultDataStoreParameters.networkSessionParameters.resourceLoadStatisticsDirectory, parameters.defaultDataStoreParameters.networkSessionParameters.resourceLoadStatisticsDirectoryExtensionHandle); … … 599 599 enableResourceLoadStatistics = m_websiteDataStore->resourceLoadStatisticsEnabled(); 600 600 #if ENABLE(RESOURCE_LOAD_STATISTICS) 601 enableResourceLoadStatisticsLogTestingEvent = m_websiteDataStore-> websiteDataStore().hasStatisticsTestingCallback();601 enableResourceLoadStatisticsLogTestingEvent = m_websiteDataStore->hasStatisticsTestingCallback(); 602 602 #endif 603 603 if (enableResourceLoadStatistics) { 604 auto networkSessionParameters = m_websiteDataStore-> websiteDataStore().parameters().networkSessionParameters;604 auto networkSessionParameters = m_websiteDataStore->parameters().networkSessionParameters; 605 605 shouldIncludeLocalhost = networkSessionParameters.shouldIncludeLocalhostInResourceLoadStatistics; 606 606 enableResourceLoadStatisticsDebugMode = networkSessionParameters.enableResourceLoadStatisticsDebugMode; … … 608 608 } 609 609 610 parameters.defaultDataStoreParameters.perOriginStorageQuota = m_websiteDataStore-> websiteDataStore().perOriginStorageQuota();611 parameters.defaultDataStoreParameters.perThirdPartyOriginStorageQuota = m_websiteDataStore-> websiteDataStore().perThirdPartyOriginStorageQuota();610 parameters.defaultDataStoreParameters.perOriginStorageQuota = m_websiteDataStore->perOriginStorageQuota(); 611 parameters.defaultDataStoreParameters.perThirdPartyOriginStorageQuota = m_websiteDataStore->perThirdPartyOriginStorageQuota(); 612 612 } 613 613 … … 692 692 if (!websiteDataStore) { 693 693 if (!m_websiteDataStore) 694 m_websiteDataStore = API::WebsiteDataStore::defaultDataStore().ptr();695 websiteDataStore = &m_websiteDataStore->websiteDataStore();694 m_websiteDataStore = WebKit::WebsiteDataStore::defaultDataStore().ptr(); 695 websiteDataStore = m_websiteDataStore.get(); 696 696 } 697 697 … … 804 804 // In platforms using Bubblewrap for sandboxing, prewarmed process is launched using the WebProcessPool primary WebsiteDataStore, 805 805 // so we don't use it in case of using a different WebsiteDataStore. 806 if (m_sandboxEnabled && m_websiteDataStore && &m_websiteDataStore->websiteDataStore() != &websiteDataStore)806 if (m_sandboxEnabled && m_websiteDataStore && m_websiteDataStore.get() != &websiteDataStore) 807 807 return nullptr; 808 808 #endif … … 1081 1081 1082 1082 if (m_websiteDataStore) 1083 m_websiteDataStore-> websiteDataStore().didCreateNetworkProcess();1083 m_websiteDataStore->didCreateNetworkProcess(); 1084 1084 } 1085 1085 … … 1160 1160 1161 1161 #if PLATFORM(COCOA) 1162 bool mustMatchDataStore = API::WebsiteDataStore::defaultDataStoreExists() && &websiteDataStore != &API::WebsiteDataStore::defaultDataStore()->websiteDataStore();1162 bool mustMatchDataStore = WebKit::WebsiteDataStore::defaultDataStoreExists() && &websiteDataStore != WebKit::WebsiteDataStore::defaultDataStore().ptr(); 1163 1163 #else 1164 1164 bool mustMatchDataStore = false; … … 1194 1194 // But if there is an attempt to create a web page without any specified data store, then we have to create it. 1195 1195 if (!m_websiteDataStore) 1196 m_websiteDataStore = API::WebsiteDataStore::defaultDataStore().ptr();1196 m_websiteDataStore = WebKit::WebsiteDataStore::defaultDataStore().ptr(); 1197 1197 1198 1198 pageConfiguration->setWebsiteDataStore(m_websiteDataStore.get()); … … 1205 1205 process = &pageConfiguration->relatedPage()->ensureRunningProcess(); 1206 1206 // We do not support several WebsiteDataStores sharing a single process. 1207 ASSERT(process.get() == m_dummyProcessProxy || &pageConfiguration->websiteDataStore()->websiteDataStore() == &process->websiteDataStore());1208 ASSERT(&pageConfiguration->relatedPage()->websiteDataStore() == &pageConfiguration->websiteDataStore()->websiteDataStore());1207 ASSERT(process.get() == m_dummyProcessProxy || pageConfiguration->websiteDataStore() == &process->websiteDataStore()); 1208 ASSERT(&pageConfiguration->relatedPage()->websiteDataStore() == pageConfiguration->websiteDataStore()); 1209 1209 } else if (!m_isDelayedWebProcessLaunchDisabled) { 1210 1210 // In the common case, we delay process launch until something is actually loaded in the page. … … 1216 1216 process = m_dummyProcessProxy; 1217 1217 } else 1218 process = &processForRegistrableDomain( pageConfiguration->websiteDataStore()->websiteDataStore(), nullptr, { });1218 process = &processForRegistrableDomain(*pageConfiguration->websiteDataStore(), nullptr, { }); 1219 1219 1220 1220 ASSERT(process); … … 1266 1266 String serviceWorkerRegistrationDirectory = store.resolvedServiceWorkerRegistrationDirectory(); 1267 1267 if (serviceWorkerRegistrationDirectory.isEmpty()) 1268 serviceWorkerRegistrationDirectory = API::WebsiteDataStore::defaultDataStoreConfiguration()->serviceWorkerRegistrationDirectory();1268 serviceWorkerRegistrationDirectory = WebKit::WebsiteDataStore::defaultDataStoreConfiguration()->serviceWorkerRegistrationDirectory(); 1269 1269 1270 1270 return m_mayHaveRegisteredServiceWorkers.ensure(serviceWorkerRegistrationDirectory, [&] { -
trunk/Source/WebKit/UIProcess/WebProcessPool.h
r250148 r250169 29 29 #include "APIObject.h" 30 30 #include "APIProcessPoolConfiguration.h" 31 #include "APIWebsiteDataStore.h"32 31 #include "DownloadProxyMap.h" 33 32 #include "GenericCallback.h" … … 45 44 #include "WebPreferencesStore.h" 46 45 #include "WebProcessProxy.h" 46 #include "WebsiteDataStore.h" 47 47 #include <WebCore/CrossSiteNavigationDataTransfer.h> 48 48 #include <WebCore/ProcessIdentifier.h> … … 205 205 void disconnectProcess(WebProcessProxy*); 206 206 207 API::WebsiteDataStore* websiteDataStore() const { return m_websiteDataStore.get(); }208 void setPrimaryDataStore( API::WebsiteDataStore& dataStore) { m_websiteDataStore = &dataStore; }207 WebKit::WebsiteDataStore* websiteDataStore() const { return m_websiteDataStore.get(); } 208 void setPrimaryDataStore(WebKit::WebsiteDataStore& dataStore) { m_websiteDataStore = &dataStore; } 209 209 210 210 Ref<WebPageProxy> createWebPage(PageClient&, Ref<API::PageConfiguration>&&); … … 678 678 double m_memorySamplerInterval { 1400.0 }; 679 679 680 RefPtr< API::WebsiteDataStore> m_websiteDataStore;680 RefPtr<WebKit::WebsiteDataStore> m_websiteDataStore; 681 681 682 682 typedef HashMap<const char*, RefPtr<WebContextSupplement>, PtrHash<const char*>> WebContextSupplementMap; -
trunk/Source/WebKit/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm
r250150 r250169 28 28 29 29 #import "CookieStorageUtilsCF.h" 30 #import "SandboxUtilities.h" 30 31 #import "StorageManager.h" 31 32 #import "WebResourceLoadStatisticsStore.h" … … 230 231 } 231 232 232 } 233 NSString *WebDatabaseDirectoryDefaultsKey = @"WebDatabaseDirectory"; 234 NSString *WebStorageDirectoryDefaultsKey = @"WebKitLocalStorageDatabasePathPreferenceKey"; 235 NSString *WebKitMediaCacheDirectoryDefaultsKey = @"WebKitMediaCacheDirectory"; 236 NSString *WebKitMediaKeysStorageDirectoryDefaultsKey = @"WebKitMediaKeysStorageDirectory"; 237 238 WTF::String WebsiteDataStore::defaultApplicationCacheDirectory() 239 { 240 #if PLATFORM(IOS_FAMILY) 241 // This quirk used to make these apps share application cache storage, but doesn't accomplish that any more. 242 // Preserving it avoids the need to migrate data when upgrading. 243 // FIXME: Ideally we should just have Safari, WebApp, and webbookmarksd create a data store with 244 // this application cache path, but that's not supported as of right now. 245 if (WebCore::IOSApplication::isMobileSafari() || WebCore::IOSApplication::isWebApp() || WebCore::IOSApplication::isWebBookmarksD()) { 246 NSString *cachePath = [NSHomeDirectory() stringByAppendingPathComponent:@"Library/Caches/com.apple.WebAppCache"]; 247 248 return WebKit::stringByResolvingSymlinksInPath(cachePath.stringByStandardizingPath); 249 } 250 #endif 251 252 return cacheDirectoryFileSystemRepresentation("OfflineWebApplicationCache"); 253 } 254 255 WTF::String WebsiteDataStore::defaultCacheStorageDirectory() 256 { 257 return cacheDirectoryFileSystemRepresentation("CacheStorage"); 258 } 259 260 WTF::String WebsiteDataStore::defaultNetworkCacheDirectory() 261 { 262 return cacheDirectoryFileSystemRepresentation("NetworkCache"); 263 } 264 265 WTF::String WebsiteDataStore::defaultMediaCacheDirectory() 266 { 267 return tempDirectoryFileSystemRepresentation("MediaCache"); 268 } 269 270 WTF::String WebsiteDataStore::defaultIndexedDBDatabaseDirectory() 271 { 272 return websiteDataDirectoryFileSystemRepresentation("IndexedDB"); 273 } 274 275 WTF::String WebsiteDataStore::defaultServiceWorkerRegistrationDirectory() 276 { 277 return cacheDirectoryFileSystemRepresentation("ServiceWorkers"); 278 } 279 280 WTF::String WebsiteDataStore::defaultLocalStorageDirectory() 281 { 282 return websiteDataDirectoryFileSystemRepresentation("LocalStorage"); 283 } 284 285 WTF::String WebsiteDataStore::defaultMediaKeysStorageDirectory() 286 { 287 return websiteDataDirectoryFileSystemRepresentation("MediaKeys"); 288 } 289 290 WTF::String WebsiteDataStore::defaultWebSQLDatabaseDirectory() 291 { 292 return websiteDataDirectoryFileSystemRepresentation("WebSQL"); 293 } 294 295 WTF::String WebsiteDataStore::defaultResourceLoadStatisticsDirectory() 296 { 297 return websiteDataDirectoryFileSystemRepresentation("ResourceLoadStatistics"); 298 } 299 300 WTF::String WebsiteDataStore::defaultJavaScriptConfigurationDirectory() 301 { 302 return tempDirectoryFileSystemRepresentation("JavaScriptCoreDebug", ShouldCreateDirectory::No); 303 } 304 305 WTF::String WebsiteDataStore::tempDirectoryFileSystemRepresentation(const WTF::String& directoryName, ShouldCreateDirectory shouldCreateDirectory) 306 { 307 static dispatch_once_t onceToken; 308 static NSURL *tempURL; 309 310 dispatch_once(&onceToken, ^{ 311 NSURL *url = [NSURL fileURLWithPath:NSTemporaryDirectory() isDirectory:YES]; 312 if (!url) 313 RELEASE_ASSERT_NOT_REACHED(); 314 315 if (!WebKit::processHasContainer()) { 316 NSString *bundleIdentifier = [NSBundle mainBundle].bundleIdentifier; 317 if (!bundleIdentifier) 318 bundleIdentifier = [NSProcessInfo processInfo].processName; 319 url = [url URLByAppendingPathComponent:bundleIdentifier isDirectory:YES]; 320 } 321 322 tempURL = [[url URLByAppendingPathComponent:@"WebKit" isDirectory:YES] retain]; 323 }); 324 325 NSURL *url = [tempURL URLByAppendingPathComponent:directoryName isDirectory:YES]; 326 327 if (shouldCreateDirectory == ShouldCreateDirectory::Yes 328 && (![[NSFileManager defaultManager] createDirectoryAtURL:url withIntermediateDirectories:YES attributes:nil error:nullptr])) 329 LOG_ERROR("Failed to create directory %@", url); 330 331 return url.absoluteURL.path.fileSystemRepresentation; 332 } 333 334 WTF::String WebsiteDataStore::cacheDirectoryFileSystemRepresentation(const WTF::String& directoryName) 335 { 336 static dispatch_once_t onceToken; 337 static NSURL *cacheURL; 338 339 dispatch_once(&onceToken, ^{ 340 NSURL *url = [[NSFileManager defaultManager] URLForDirectory:NSCachesDirectory inDomain:NSUserDomainMask appropriateForURL:nullptr create:NO error:nullptr]; 341 if (!url) 342 RELEASE_ASSERT_NOT_REACHED(); 343 344 if (!WebKit::processHasContainer()) { 345 NSString *bundleIdentifier = [NSBundle mainBundle].bundleIdentifier; 346 if (!bundleIdentifier) 347 bundleIdentifier = [NSProcessInfo processInfo].processName; 348 url = [url URLByAppendingPathComponent:bundleIdentifier isDirectory:YES]; 349 } 350 351 cacheURL = [[url URLByAppendingPathComponent:@"WebKit" isDirectory:YES] retain]; 352 }); 353 354 NSURL *url = [cacheURL URLByAppendingPathComponent:directoryName isDirectory:YES]; 355 if (![[NSFileManager defaultManager] createDirectoryAtURL:url withIntermediateDirectories:YES attributes:nil error:nullptr]) 356 LOG_ERROR("Failed to create directory %@", url); 357 358 return url.absoluteURL.path.fileSystemRepresentation; 359 } 360 361 WTF::String WebsiteDataStore::websiteDataDirectoryFileSystemRepresentation(const WTF::String& directoryName) 362 { 363 static dispatch_once_t onceToken; 364 static NSURL *websiteDataURL; 365 366 dispatch_once(&onceToken, ^{ 367 NSURL *url = [[NSFileManager defaultManager] URLForDirectory:NSLibraryDirectory inDomain:NSUserDomainMask appropriateForURL:nullptr create:NO error:nullptr]; 368 if (!url) 369 RELEASE_ASSERT_NOT_REACHED(); 370 371 url = [url URLByAppendingPathComponent:@"WebKit" isDirectory:YES]; 372 373 if (!WebKit::processHasContainer()) { 374 NSString *bundleIdentifier = [NSBundle mainBundle].bundleIdentifier; 375 if (!bundleIdentifier) 376 bundleIdentifier = [NSProcessInfo processInfo].processName; 377 url = [url URLByAppendingPathComponent:bundleIdentifier isDirectory:YES]; 378 } 379 380 websiteDataURL = [[url URLByAppendingPathComponent:@"WebsiteData" isDirectory:YES] retain]; 381 }); 382 383 NSURL *url = [websiteDataURL URLByAppendingPathComponent:directoryName isDirectory:YES]; 384 if (![[NSFileManager defaultManager] createDirectoryAtURL:url withIntermediateDirectories:YES attributes:nil error:nullptr]) 385 LOG_ERROR("Failed to create directory %@", url); 386 387 return url.absoluteURL.path.fileSystemRepresentation; 388 } 389 390 } -
trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp
r250150 r250169 27 27 #include "WebsiteDataStore.h" 28 28 29 #include "APIHTTPCookieStore.h" 29 30 #include "APIProcessPoolConfiguration.h" 30 31 #include "APIWebsiteDataRecord.h" 31 #include "APIWebsiteDataStore.h"32 32 #include "AuthenticatorManager.h" 33 33 #include "DeviceIdHashSaltStorage.h" … … 36 36 #include "ShouldGrandfatherStatistics.h" 37 37 #include "StorageAccessStatus.h" 38 #include "WebKit2Initialize.h" 38 39 #include "WebPageProxy.h" 39 40 #include "WebProcessCache.h" … … 154 155 } 155 156 157 static RefPtr<WebsiteDataStore>& globalDefaultDataStore() 158 { 159 static NeverDestroyed<RefPtr<WebsiteDataStore>> globalDefaultDataStore; 160 return globalDefaultDataStore.get(); 161 } 162 163 Ref<WebsiteDataStore> WebsiteDataStore::defaultDataStore() 164 { 165 InitializeWebKit2(); 166 167 auto& store = globalDefaultDataStore(); 168 if (!store) 169 store = adoptRef(new WebsiteDataStore(defaultDataStoreConfiguration(), PAL::SessionID::defaultSessionID())); 170 171 return *store; 172 } 173 174 void WebsiteDataStore::deleteDefaultDataStoreForTesting() 175 { 176 globalDefaultDataStore() = nullptr; 177 } 178 179 bool WebsiteDataStore::defaultDataStoreExists() 180 { 181 return !!globalDefaultDataStore(); 182 } 183 184 Ref<WebKit::WebsiteDataStoreConfiguration> WebsiteDataStore::defaultDataStoreConfiguration() 185 { 186 auto configuration = WebsiteDataStoreConfiguration::create(); 187 188 configuration->setPersistent(true); 189 190 configuration->setApplicationCacheDirectory(defaultApplicationCacheDirectory()); 191 configuration->setCacheStorageDirectory(defaultCacheStorageDirectory()); 192 configuration->setNetworkCacheDirectory(defaultNetworkCacheDirectory()); 193 configuration->setMediaCacheDirectory(defaultMediaCacheDirectory()); 194 195 configuration->setIndexedDBDatabaseDirectory(defaultIndexedDBDatabaseDirectory()); 196 configuration->setServiceWorkerRegistrationDirectory(defaultServiceWorkerRegistrationDirectory()); 197 configuration->setWebSQLDatabaseDirectory(defaultWebSQLDatabaseDirectory()); 198 configuration->setLocalStorageDirectory(defaultLocalStorageDirectory()); 199 configuration->setMediaKeysStorageDirectory(defaultMediaKeysStorageDirectory()); 200 configuration->setResourceLoadStatisticsDirectory(defaultResourceLoadStatisticsDirectory()); 201 configuration->setDeviceIdHashSaltsStorageDirectory(defaultDeviceIdHashSaltsStorageDirectory()); 202 203 configuration->setJavaScriptConfigurationDirectory(defaultJavaScriptConfigurationDirectory()); 204 205 return configuration; 206 } 207 156 208 void WebsiteDataStore::maybeRegisterWithSessionIDMap() 157 209 { … … 1727 1779 { 1728 1780 if (auto* processPoolDataStore = processPool.websiteDataStore()) 1729 return &processPoolDataStore->websiteDataStore()== this;1781 return processPoolDataStore == this; 1730 1782 return false; 1731 1783 } … … 2057 2109 } 2058 2110 2059 } 2111 #if !PLATFORM(COCOA) 2112 WTF::String WebsiteDataStore::defaultMediaCacheDirectory() 2113 { 2114 // FIXME: Implement. https://bugs.webkit.org/show_bug.cgi?id=156369 and https://bugs.webkit.org/show_bug.cgi?id=156370 2115 return WTF::String(); 2116 } 2117 2118 WTF::String WebsiteDataStore::defaultJavaScriptConfigurationDirectory() 2119 { 2120 // FIXME: Implement. 2121 return WTF::String(); 2122 } 2123 #endif 2124 2125 #if !USE(GLIB) 2126 WTF::String WebsiteDataStore::defaultDeviceIdHashSaltsStorageDirectory() 2127 { 2128 // Not implemented. 2129 return WTF::String(); 2130 } 2131 #endif 2132 2133 } -
trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h
r250150 r250169 93 93 #endif 94 94 95 class WebsiteDataStore : public RefCounted<WebsiteDataStore>, public Identified<WebsiteDataStore>, public CanMakeWeakPtr<WebsiteDataStore> {95 class WebsiteDataStore : public API::ObjectImpl<API::Object::Type::WebsiteDataStore>, public Identified<WebsiteDataStore>, public CanMakeWeakPtr<WebsiteDataStore> { 96 96 public: 97 static Ref<WebsiteDataStore> defaultDataStore(); 98 static bool defaultDataStoreExists(); 99 static void deleteDefaultDataStoreForTesting(); 100 static Ref<WebsiteDataStoreConfiguration> defaultDataStoreConfiguration(); 101 97 102 static Ref<WebsiteDataStore> createNonPersistent(); 98 103 static Ref<WebsiteDataStore> create(Ref<WebsiteDataStoreConfiguration>&&, PAL::SessionID); 99 virtual ~WebsiteDataStore(); 104 105 WebsiteDataStore(PAL::SessionID); 106 WebsiteDataStore(Ref<WebsiteDataStoreConfiguration>&&, PAL::SessionID); 107 ~WebsiteDataStore(); 100 108 101 109 static WebsiteDataStore* existingNonDefaultDataStoreForSessionID(PAL::SessionID); … … 262 270 #endif 263 271 272 static WTF::String defaultServiceWorkerRegistrationDirectory(); 273 static WTF::String defaultLocalStorageDirectory(); 274 static WTF::String defaultResourceLoadStatisticsDirectory(); 275 static WTF::String defaultNetworkCacheDirectory(); 276 static WTF::String defaultApplicationCacheDirectory(); 277 static WTF::String defaultWebSQLDatabaseDirectory(); 278 #if USE(GLIB) 279 static WTF::String defaultHSTSDirectory(); 280 #endif 281 static WTF::String defaultIndexedDBDatabaseDirectory(); 282 static WTF::String defaultCacheStorageDirectory(); 283 static WTF::String defaultMediaCacheDirectory(); 284 static WTF::String defaultMediaKeysStorageDirectory(); 285 static WTF::String defaultDeviceIdHashSaltsStorageDirectory(); 286 static WTF::String defaultJavaScriptConfigurationDirectory(); 287 264 288 private: 265 explicit WebsiteDataStore(PAL::SessionID);266 explicit WebsiteDataStore(Ref<WebsiteDataStoreConfiguration>&&, PAL::SessionID);267 268 289 void fetchDataAndApply(OptionSet<WebsiteDataType>, OptionSet<WebsiteDataFetchOption>, RefPtr<WorkQueue>&&, Function<void(Vector<WebsiteDataRecord>)>&& apply); 269 290 … … 275 296 void platformSetNetworkParameters(WebsiteDataStoreParameters&); 276 297 #endif 298 299 WebsiteDataStore(); 300 301 enum class ShouldCreateDirectory { No, Yes }; 302 static WTF::String tempDirectoryFileSystemRepresentation(const WTF::String& directoryName, ShouldCreateDirectory = ShouldCreateDirectory::Yes); 303 static WTF::String cacheDirectoryFileSystemRepresentation(const WTF::String& directoryName); 304 static WTF::String websiteDataDirectoryFileSystemRepresentation(const WTF::String& directoryName); 277 305 278 306 HashSet<RefPtr<WebProcessPool>> processPools(size_t count = std::numeric_limits<size_t>::max(), bool ensureAPoolExists = true) const; -
trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStoreConfiguration.cpp
r250150 r250169 27 27 #include "WebsiteDataStoreConfiguration.h" 28 28 29 #include " APIWebsiteDataStore.h"29 #include "WebsiteDataStore.h" 30 30 31 31 namespace WebKit { -
trunk/Source/WebKit/UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp
r249778 r250169 28 28 29 29 #include <WebCore/NotImplemented.h> 30 #include <wtf/FileSystem.h> 30 31 31 32 namespace WebKit { … … 46 47 } 47 48 49 String WebsiteDataStore::defaultApplicationCacheDirectory() 50 { 51 return FileSystem::pathByAppendingComponent(FileSystem::localUserSpecificStorageDirectory(), "ApplicationCache"); 52 } 53 54 String WebsiteDataStore::defaultCacheStorageDirectory() 55 { 56 return FileSystem::pathByAppendingComponent(FileSystem::localUserSpecificStorageDirectory(), "CacheStorage"); 57 } 58 59 String WebsiteDataStore::defaultNetworkCacheDirectory() 60 { 61 return FileSystem::pathByAppendingComponent(FileSystem::localUserSpecificStorageDirectory(), "NetworkCache"); 62 } 63 64 String WebsiteDataStore::defaultIndexedDBDatabaseDirectory() 65 { 66 return FileSystem::pathByAppendingComponent(FileSystem::localUserSpecificStorageDirectory(), "IndexedDB"); 67 } 68 69 String WebsiteDataStore::defaultServiceWorkerRegistrationDirectory() 70 { 71 return FileSystem::pathByAppendingComponent(FileSystem::localUserSpecificStorageDirectory(), "ServiceWorkers"); 72 } 73 74 String WebsiteDataStore::defaultLocalStorageDirectory() 75 { 76 return FileSystem::pathByAppendingComponent(FileSystem::localUserSpecificStorageDirectory(), "LocalStorage"); 77 } 78 79 String WebsiteDataStore::defaultMediaKeysStorageDirectory() 80 { 81 return FileSystem::pathByAppendingComponent(FileSystem::localUserSpecificStorageDirectory(), "MediaKeyStorage"); 82 } 83 84 String WebsiteDataStore::defaultWebSQLDatabaseDirectory() 85 { 86 return FileSystem::pathByAppendingComponent(FileSystem::localUserSpecificStorageDirectory(), "WebSQL"); 87 } 88 89 String WebsiteDataStore::defaultResourceLoadStatisticsDirectory() 90 { 91 return FileSystem::pathByAppendingComponent(FileSystem::localUserSpecificStorageDirectory(), "ResourceLoadStatistics"); 92 } 93 94 String WebsiteDataStore::cacheDirectoryFileSystemRepresentation(const String& directoryName) 95 { 96 return FileSystem::pathByAppendingComponent(FileSystem::localUserSpecificStorageDirectory(), directoryName); 97 } 98 99 String WebsiteDataStore::websiteDataDirectoryFileSystemRepresentation(const String& directoryName) 100 { 101 return FileSystem::pathByAppendingComponent(FileSystem::localUserSpecificStorageDirectory(), directoryName); 102 } 103 48 104 } // namespace WebKit -
trunk/Source/WebKit/UIProcess/glib/WebProcessProxyGLib.cpp
r249778 r250169 44 44 // Prewarmed processes don't have a WebsiteDataStore yet, so use the primary WebsiteDataStore from the WebProcessPool. 45 45 // The process won't be used if current WebsiteDataStore is different than the WebProcessPool primary one. 46 if (auto* apiDataStore = m_processPool->websiteDataStore()) 47 dataStore = &apiDataStore->websiteDataStore(); 46 dataStore = m_processPool->websiteDataStore(); 48 47 } 49 48 -
trunk/Source/WebKit/UIProcess/glib/WebsiteDataStoreGLib.cpp
r250168 r250169 25 25 26 26 #include "config.h" 27 #include " APIWebsiteDataStore.h"27 #include "WebsiteDataStore.h" 28 28 29 29 #include <wtf/FileSystem.h> … … 36 36 #endif 37 37 38 namespace API{38 namespace WebKit { 39 39 40 40 WTF::String WebsiteDataStore::defaultApplicationCacheDirectory() -
trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj
r250148 r250169 179 179 1A334DED16DE8F88006A8E38 /* StorageAreaMapMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A334DEB16DE8F88006A8E38 /* StorageAreaMapMessageReceiver.cpp */; }; 180 180 1A334DEE16DE8F88006A8E38 /* StorageAreaMapMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A334DEC16DE8F88006A8E38 /* StorageAreaMapMessages.h */; }; 181 1A3635AA1A3144A300ED6197 /* APIWebsiteDataStore.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A3635A81A3144A300ED6197 /* APIWebsiteDataStore.h */; };182 181 1A3C888018A5ABAE00C4C962 /* WKPreferencesInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A3C887F18A5ABAE00C4C962 /* WKPreferencesInternal.h */; }; 183 182 1A3CC16718906ACF001E6ED8 /* WKWebView.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A3CC16518906ACF001E6ED8 /* WKWebView.h */; settings = {ATTRIBUTES = (Public, ); }; }; … … 2124 2123 1A334DEB16DE8F88006A8E38 /* StorageAreaMapMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StorageAreaMapMessageReceiver.cpp; path = DerivedSources/WebKit2/StorageAreaMapMessageReceiver.cpp; sourceTree = BUILT_PRODUCTS_DIR; }; 2125 2124 1A334DEC16DE8F88006A8E38 /* StorageAreaMapMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StorageAreaMapMessages.h; path = DerivedSources/WebKit2/StorageAreaMapMessages.h; sourceTree = BUILT_PRODUCTS_DIR; }; 2126 1A3635A71A3144A300ED6197 /* APIWebsiteDataStore.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = APIWebsiteDataStore.cpp; sourceTree = "<group>"; };2127 1A3635A81A3144A300ED6197 /* APIWebsiteDataStore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APIWebsiteDataStore.h; sourceTree = "<group>"; };2128 1A3635AB1A3145E500ED6197 /* APIWebsiteDataStoreCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = APIWebsiteDataStoreCocoa.mm; sourceTree = "<group>"; };2129 2125 1A3A73CB1A48C6D4007231B3 /* APIPageGroupHandle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = APIPageGroupHandle.cpp; sourceTree = "<group>"; }; 2130 2126 1A3A73CC1A48C6D4007231B3 /* APIPageGroupHandle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APIPageGroupHandle.h; sourceTree = "<group>"; }; … … 6372 6368 5CA46E7A21F1A23900CE86B4 /* APIHTTPCookieStoreCocoa.mm */, 6373 6369 FED3C1DA1B447AE800E0EB7F /* APISerializedScriptValueCocoa.mm */, 6374 1A3635AB1A3145E500ED6197 /* APIWebsiteDataStoreCocoa.mm */,6375 6370 1AFDE64319510B5500C48FFA /* LegacyBundleForClass.mm */, 6376 6371 1C20935E22318CB000026A39 /* NSAttributedString.h */, … … 7984 7979 1AE286811C7F93860069AC4F /* APIWebsiteDataRecord.cpp */, 7985 7980 1AE286821C7F93860069AC4F /* APIWebsiteDataRecord.h */, 7986 1A3635A71A3144A300ED6197 /* APIWebsiteDataStore.cpp */,7987 1A3635A81A3144A300ED6197 /* APIWebsiteDataStore.h */,7988 7981 5C8DD37D1FE4501100F2A556 /* APIWebsitePolicies.cpp */, 7989 7982 5C8DD37C1FE4501100F2A556 /* APIWebsitePolicies.h */, … … 9389 9382 C5E1AFEF16B21029006CC1F2 /* APIWebArchiveResource.h in Headers */, 9390 9383 1AE286841C7F93860069AC4F /* APIWebsiteDataRecord.h in Headers */, 9391 1A3635AA1A3144A300ED6197 /* APIWebsiteDataStore.h in Headers */,9392 9384 1A6563E51B7A8C50009CF787 /* APIWindowFeatures.h in Headers */, 9393 9385 F48D2A8521583A7E00C6752B /* AppKitSPI.h in Headers */, -
trunk/Source/WebKit/WebProcess/MediaCache/WebMediaKeyStorageManager.cpp
r249778 r250169 38 38 void WebMediaKeyStorageManager::setWebsiteDataStore(const WebProcessDataStoreParameters& parameters) 39 39 { 40 ASSERT(!parameters.mediaKeyStorageDirectory.isEmpty());41 40 m_mediaKeyStorageDirectory = parameters.mediaKeyStorageDirectory; 42 41 }
Note:
See TracChangeset
for help on using the changeset viewer.