Unreviewed, rolling out r240630.
[WebKit-https.git] / Source / WebKit / UIProcess / API / APIWebsiteDataStore.h
index bfcbecf..9305950 100644 (file)
@@ -36,11 +36,12 @@ class WebsiteDataStore final : public ObjectImpl<Object::Type::WebsiteDataStore>
 public:
     static Ref<WebsiteDataStore> defaultDataStore();
     static bool defaultDataStoreExists();
+    static void deleteDefaultDataStoreForTesting();
 
     static Ref<WebsiteDataStore> createNonPersistentDataStore();
-    static Ref<WebsiteDataStore> createLegacy(WebKit::WebsiteDataStore::Configuration);
+    static Ref<WebsiteDataStore> createLegacy(Ref<WebKit::WebsiteDataStoreConfiguration>&&);
 
-    explicit WebsiteDataStore(WebKit::WebsiteDataStore::Configuration, PAL::SessionID);
+    explicit WebsiteDataStore(Ref<WebKit::WebsiteDataStoreConfiguration>&&, PAL::SessionID);
     virtual ~WebsiteDataStore();
 
     bool isPersistent();
@@ -53,39 +54,41 @@ public:
     WebKit::WebsiteDataStore& websiteDataStore() { return m_websiteDataStore.get(); }
     HTTPCookieStore& httpCookieStore();
 
-    static String defaultApplicationCacheDirectory();
-    static String defaultCacheStorageDirectory();
-    static String defaultNetworkCacheDirectory();
-    static String defaultMediaCacheDirectory();
-    static String defaultIndexedDBDatabaseDirectory();
-    static String defaultServiceWorkerRegistrationDirectory();
-    static String defaultLocalStorageDirectory();
-    static String defaultMediaKeysStorageDirectory();
-    static String defaultWebSQLDatabaseDirectory();
-    static String defaultResourceLoadStatisticsDirectory();
-    static String defaultJavaScriptConfigurationDirectory();
-
-    static WebKit::WebsiteDataStore::Configuration defaultDataStoreConfiguration();
-
-    static String legacyDefaultApplicationCacheDirectory();
-    static String legacyDefaultNetworkCacheDirectory();
-    static String legacyDefaultLocalStorageDirectory();
-    static String legacyDefaultIndexedDBDatabaseDirectory();
-    static String legacyDefaultWebSQLDatabaseDirectory();
-    static String legacyDefaultMediaKeysStorageDirectory();
-    static String legacyDefaultMediaCacheDirectory();
-    static String legacyDefaultJavaScriptConfigurationDirectory();
-
-    static WebKit::WebsiteDataStore::Configuration legacyDefaultDataStoreConfiguration();
+    static WTF::String defaultApplicationCacheDirectory();
+    static WTF::String defaultCacheStorageDirectory();
+    static WTF::String defaultNetworkCacheDirectory();
+    static WTF::String defaultMediaCacheDirectory();
+    static WTF::String defaultIndexedDBDatabaseDirectory();
+    static WTF::String defaultServiceWorkerRegistrationDirectory();
+    static WTF::String defaultLocalStorageDirectory();
+    static WTF::String defaultMediaKeysStorageDirectory();
+    static WTF::String defaultDeviceIdHashSaltsStorageDirectory();
+    static WTF::String defaultWebSQLDatabaseDirectory();
+    static WTF::String defaultResourceLoadStatisticsDirectory();
+    static WTF::String defaultJavaScriptConfigurationDirectory();
+
+    static Ref<WebKit::WebsiteDataStoreConfiguration> defaultDataStoreConfiguration();
+
+    static WTF::String legacyDefaultApplicationCacheDirectory();
+    static WTF::String legacyDefaultNetworkCacheDirectory();
+    static WTF::String legacyDefaultLocalStorageDirectory();
+    static WTF::String legacyDefaultIndexedDBDatabaseDirectory();
+    static WTF::String legacyDefaultWebSQLDatabaseDirectory();
+    static WTF::String legacyDefaultMediaKeysStorageDirectory();
+    static WTF::String legacyDefaultDeviceIdHashSaltsStorageDirectory();
+    static WTF::String legacyDefaultMediaCacheDirectory();
+    static WTF::String legacyDefaultJavaScriptConfigurationDirectory();
+
+    static Ref<WebKit::WebsiteDataStoreConfiguration> legacyDefaultDataStoreConfiguration();
 
 private:
     enum ShouldCreateDirectory { CreateDirectory, DontCreateDirectory };
 
     WebsiteDataStore();
 
-    static String tempDirectoryFileSystemRepresentation(const String& directoryName, ShouldCreateDirectory shouldCreateDirectory = CreateDirectory);
-    static String cacheDirectoryFileSystemRepresentation(const String& directoryName);
-    static String websiteDataDirectoryFileSystemRepresentation(const String& directoryName);
+    static WTF::String tempDirectoryFileSystemRepresentation(const WTF::String& directoryName, ShouldCreateDirectory = CreateDirectory);
+    static WTF::String cacheDirectoryFileSystemRepresentation(const WTF::String& directoryName);
+    static WTF::String websiteDataDirectoryFileSystemRepresentation(const WTF::String& directoryName);
 
     Ref<WebKit::WebsiteDataStore> m_websiteDataStore;
     RefPtr<HTTPCookieStore> m_apiHTTPCookieStore;