Move legacy directory configuration from WebProcessPool to API::WebsiteDataStore
authorsihui_liu@apple.com <sihui_liu@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 23 Aug 2018 05:52:57 +0000 (05:52 +0000)
committersihui_liu@apple.com <sihui_liu@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 23 Aug 2018 05:52:57 +0000 (05:52 +0000)
https://bugs.webkit.org/show_bug.cgi?id=188765

Reviewed by Geoffrey Garen.

Diretories are parameters of websiteDataStore instead of webProcessPool, so we should move
legacy default paths to API::WebsiteDataStore, which already stores default paths for
non-legacy cases.

* UIProcess/API/APIProcessPoolConfiguration.cpp:
(API::ProcessPoolConfiguration::createWithLegacyOptions):
(API::ProcessPoolConfiguration::createWithWebsiteDataStoreConfiguration):
* UIProcess/API/APIWebsiteDataStore.cpp:
(API::WebsiteDataStore::legacyDefaultDataStoreConfiguration):
* UIProcess/API/APIWebsiteDataStore.h:
* UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
(API::WebsiteDataStore::legacyDefaultApplicationCacheDirectory):
(API::WebsiteDataStore::legacyDefaultNetworkCacheDirectory):
(API::WebsiteDataStore::legacyDefaultWebSQLDatabaseDirectory):
(API::WebsiteDataStore::legacyDefaultIndexedDBDatabaseDirectory):
(API::WebsiteDataStore::legacyDefaultLocalStorageDirectory):
(API::WebsiteDataStore::legacyDefaultMediaCacheDirectory):
(API::WebsiteDataStore::legacyDefaultMediaKeysStorageDirectory):
(API::WebsiteDataStore::legacyDefaultJavaScriptConfigurationDirectory):
* UIProcess/API/glib/APIWebsiteDataStoreGLib.cpp:
(API::WebsiteDataStore::legacyDefaultApplicationCacheDirectory):
(API::WebsiteDataStore::legacyDefaultNetworkCacheDirectory):
(API::WebsiteDataStore::legacyDefaultWebSQLDatabaseDirectory):
(API::WebsiteDataStore::legacyDefaultIndexedDBDatabaseDirectory):
(API::WebsiteDataStore::legacyDefaultLocalStorageDirectory):
(API::WebsiteDataStore::legacyDefaultMediaCacheDirectory):
(API::WebsiteDataStore::legacyDefaultMediaKeysStorageDirectory):
(API::WebsiteDataStore::legacyDefaultJavaScriptConfigurationDirectory):
* UIProcess/API/win/APIWebsiteDataStoreWin.cpp:
(API::WebsiteDataStore::legacyDefaultApplicationCacheDirectory):
(API::WebsiteDataStore::legacyDefaultNetworkCacheDirectory):
(API::WebsiteDataStore::legacyDefaultWebSQLDatabaseDirectory):
(API::WebsiteDataStore::legacyDefaultIndexedDBDatabaseDirectory):
(API::WebsiteDataStore::legacyDefaultLocalStorageDirectory):
(API::WebsiteDataStore::legacyDefaultMediaCacheDirectory):
(API::WebsiteDataStore::legacyDefaultMediaKeysStorageDirectory):
(API::WebsiteDataStore::legacyDefaultJavaScriptConfigurationDirectory):
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::legacyPlatformDefaultWebSQLDatabaseDirectory): Deleted.
(WebKit::WebProcessPool::legacyPlatformDefaultIndexedDBDatabaseDirectory): Deleted.
(WebKit::WebProcessPool::legacyPlatformDefaultLocalStorageDirectory): Deleted.
(WebKit::WebProcessPool::legacyPlatformDefaultMediaCacheDirectory): Deleted.
(WebKit::WebProcessPool::legacyPlatformDefaultMediaKeysStorageDirectory): Deleted.
(WebKit::WebProcessPool::legacyPlatformDefaultApplicationCacheDirectory): Deleted.
(WebKit::WebProcessPool::legacyPlatformDefaultNetworkCacheDirectory): Deleted.
(WebKit::WebProcessPool::legacyPlatformDefaultJavaScriptConfigurationDirectory): Deleted.
* UIProcess/WebProcessPool.h:
* UIProcess/gtk/WebProcessPoolGtk.cpp:
(WebKit::WebProcessPool::legacyPlatformDefaultApplicationCacheDirectory): Deleted.
(WebKit::WebProcessPool::legacyPlatformDefaultMediaCacheDirectory): Deleted.
(WebKit::WebProcessPool::legacyPlatformDefaultWebSQLDatabaseDirectory): Deleted.
(WebKit::WebProcessPool::legacyPlatformDefaultIndexedDBDatabaseDirectory): Deleted.
(WebKit::WebProcessPool::legacyPlatformDefaultLocalStorageDirectory): Deleted.
(WebKit::WebProcessPool::legacyPlatformDefaultMediaKeysStorageDirectory): Deleted.
(WebKit::WebProcessPool::legacyPlatformDefaultNetworkCacheDirectory): Deleted.
(WebKit::WebProcessPool::legacyPlatformDefaultJavaScriptConfigurationDirectory): Deleted.
* UIProcess/win/WebProcessPoolWin.cpp:
(WebKit::WebProcessPool::legacyPlatformDefaultApplicationCacheDirectory): Deleted.
(WebKit::WebProcessPool::legacyPlatformDefaultMediaCacheDirectory): Deleted.
(WebKit::WebProcessPool::legacyPlatformDefaultWebSQLDatabaseDirectory): Deleted.
(WebKit::WebProcessPool::legacyPlatformDefaultIndexedDBDatabaseDirectory): Deleted.
(WebKit::WebProcessPool::legacyPlatformDefaultLocalStorageDirectory): Deleted.
(WebKit::WebProcessPool::legacyPlatformDefaultMediaKeysStorageDirectory): Deleted.
(WebKit::WebProcessPool::legacyPlatformDefaultNetworkCacheDirectory): Deleted.
(WebKit::WebProcessPool::legacyPlatformDefaultJavaScriptConfigurationDirectory): Deleted.
* UIProcess/wpe/WebProcessPoolWPE.cpp:
(WebKit::WebProcessPool::legacyPlatformDefaultApplicationCacheDirectory): Deleted.
(WebKit::WebProcessPool::legacyPlatformDefaultMediaCacheDirectory): Deleted.
(WebKit::WebProcessPool::legacyPlatformDefaultWebSQLDatabaseDirectory): Deleted.
(WebKit::WebProcessPool::legacyPlatformDefaultIndexedDBDatabaseDirectory): Deleted.
(WebKit::WebProcessPool::legacyPlatformDefaultLocalStorageDirectory): Deleted.
(WebKit::WebProcessPool::legacyPlatformDefaultMediaKeysStorageDirectory): Deleted.
(WebKit::WebProcessPool::legacyPlatformDefaultNetworkCacheDirectory): Deleted.
(WebKit::WebProcessPool::legacyPlatformDefaultJavaScriptConfigurationDirectory): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235216 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 files changed:
Source/WebKit/ChangeLog
Source/WebKit/UIProcess/API/APIProcessPoolConfiguration.cpp
Source/WebKit/UIProcess/API/APIWebsiteDataStore.cpp
Source/WebKit/UIProcess/API/APIWebsiteDataStore.h
Source/WebKit/UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm
Source/WebKit/UIProcess/API/glib/APIWebsiteDataStoreGLib.cpp
Source/WebKit/UIProcess/API/win/APIWebsiteDataStoreWin.cpp
Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
Source/WebKit/UIProcess/WebProcessPool.h
Source/WebKit/UIProcess/gtk/WebProcessPoolGtk.cpp
Source/WebKit/UIProcess/win/WebProcessPoolWin.cpp
Source/WebKit/UIProcess/wpe/WebProcessPoolWPE.cpp

index e857b72..695a381 100644 (file)
@@ -1,3 +1,85 @@
+2018-08-22  Sihui Liu  <sihui_liu@apple.com>
+
+        Move legacy directory configuration from WebProcessPool to API::WebsiteDataStore
+        https://bugs.webkit.org/show_bug.cgi?id=188765
+
+        Reviewed by Geoffrey Garen.
+
+        Diretories are parameters of websiteDataStore instead of webProcessPool, so we should move
+        legacy default paths to API::WebsiteDataStore, which already stores default paths for 
+        non-legacy cases.
+
+        * UIProcess/API/APIProcessPoolConfiguration.cpp:
+        (API::ProcessPoolConfiguration::createWithLegacyOptions):
+        (API::ProcessPoolConfiguration::createWithWebsiteDataStoreConfiguration):
+        * UIProcess/API/APIWebsiteDataStore.cpp:
+        (API::WebsiteDataStore::legacyDefaultDataStoreConfiguration):
+        * UIProcess/API/APIWebsiteDataStore.h:
+        * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
+        (API::WebsiteDataStore::legacyDefaultApplicationCacheDirectory):
+        (API::WebsiteDataStore::legacyDefaultNetworkCacheDirectory):
+        (API::WebsiteDataStore::legacyDefaultWebSQLDatabaseDirectory):
+        (API::WebsiteDataStore::legacyDefaultIndexedDBDatabaseDirectory):
+        (API::WebsiteDataStore::legacyDefaultLocalStorageDirectory):
+        (API::WebsiteDataStore::legacyDefaultMediaCacheDirectory):
+        (API::WebsiteDataStore::legacyDefaultMediaKeysStorageDirectory):
+        (API::WebsiteDataStore::legacyDefaultJavaScriptConfigurationDirectory):
+        * UIProcess/API/glib/APIWebsiteDataStoreGLib.cpp:
+        (API::WebsiteDataStore::legacyDefaultApplicationCacheDirectory):
+        (API::WebsiteDataStore::legacyDefaultNetworkCacheDirectory):
+        (API::WebsiteDataStore::legacyDefaultWebSQLDatabaseDirectory):
+        (API::WebsiteDataStore::legacyDefaultIndexedDBDatabaseDirectory):
+        (API::WebsiteDataStore::legacyDefaultLocalStorageDirectory):
+        (API::WebsiteDataStore::legacyDefaultMediaCacheDirectory):
+        (API::WebsiteDataStore::legacyDefaultMediaKeysStorageDirectory):
+        (API::WebsiteDataStore::legacyDefaultJavaScriptConfigurationDirectory):
+        * UIProcess/API/win/APIWebsiteDataStoreWin.cpp:
+        (API::WebsiteDataStore::legacyDefaultApplicationCacheDirectory):
+        (API::WebsiteDataStore::legacyDefaultNetworkCacheDirectory):
+        (API::WebsiteDataStore::legacyDefaultWebSQLDatabaseDirectory):
+        (API::WebsiteDataStore::legacyDefaultIndexedDBDatabaseDirectory):
+        (API::WebsiteDataStore::legacyDefaultLocalStorageDirectory):
+        (API::WebsiteDataStore::legacyDefaultMediaCacheDirectory):
+        (API::WebsiteDataStore::legacyDefaultMediaKeysStorageDirectory):
+        (API::WebsiteDataStore::legacyDefaultJavaScriptConfigurationDirectory):
+        * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
+        (WebKit::WebProcessPool::legacyPlatformDefaultWebSQLDatabaseDirectory): Deleted.
+        (WebKit::WebProcessPool::legacyPlatformDefaultIndexedDBDatabaseDirectory): Deleted.
+        (WebKit::WebProcessPool::legacyPlatformDefaultLocalStorageDirectory): Deleted.
+        (WebKit::WebProcessPool::legacyPlatformDefaultMediaCacheDirectory): Deleted.
+        (WebKit::WebProcessPool::legacyPlatformDefaultMediaKeysStorageDirectory): Deleted.
+        (WebKit::WebProcessPool::legacyPlatformDefaultApplicationCacheDirectory): Deleted.
+        (WebKit::WebProcessPool::legacyPlatformDefaultNetworkCacheDirectory): Deleted.
+        (WebKit::WebProcessPool::legacyPlatformDefaultJavaScriptConfigurationDirectory): Deleted.
+        * UIProcess/WebProcessPool.h:
+        * UIProcess/gtk/WebProcessPoolGtk.cpp:
+        (WebKit::WebProcessPool::legacyPlatformDefaultApplicationCacheDirectory): Deleted.
+        (WebKit::WebProcessPool::legacyPlatformDefaultMediaCacheDirectory): Deleted.
+        (WebKit::WebProcessPool::legacyPlatformDefaultWebSQLDatabaseDirectory): Deleted.
+        (WebKit::WebProcessPool::legacyPlatformDefaultIndexedDBDatabaseDirectory): Deleted.
+        (WebKit::WebProcessPool::legacyPlatformDefaultLocalStorageDirectory): Deleted.
+        (WebKit::WebProcessPool::legacyPlatformDefaultMediaKeysStorageDirectory): Deleted.
+        (WebKit::WebProcessPool::legacyPlatformDefaultNetworkCacheDirectory): Deleted.
+        (WebKit::WebProcessPool::legacyPlatformDefaultJavaScriptConfigurationDirectory): Deleted.
+        * UIProcess/win/WebProcessPoolWin.cpp:
+        (WebKit::WebProcessPool::legacyPlatformDefaultApplicationCacheDirectory): Deleted.
+        (WebKit::WebProcessPool::legacyPlatformDefaultMediaCacheDirectory): Deleted.
+        (WebKit::WebProcessPool::legacyPlatformDefaultWebSQLDatabaseDirectory): Deleted.
+        (WebKit::WebProcessPool::legacyPlatformDefaultIndexedDBDatabaseDirectory): Deleted.
+        (WebKit::WebProcessPool::legacyPlatformDefaultLocalStorageDirectory): Deleted.
+        (WebKit::WebProcessPool::legacyPlatformDefaultMediaKeysStorageDirectory): Deleted.
+        (WebKit::WebProcessPool::legacyPlatformDefaultNetworkCacheDirectory): Deleted.
+        (WebKit::WebProcessPool::legacyPlatformDefaultJavaScriptConfigurationDirectory): Deleted.
+        * UIProcess/wpe/WebProcessPoolWPE.cpp:
+        (WebKit::WebProcessPool::legacyPlatformDefaultApplicationCacheDirectory): Deleted.
+        (WebKit::WebProcessPool::legacyPlatformDefaultMediaCacheDirectory): Deleted.
+        (WebKit::WebProcessPool::legacyPlatformDefaultWebSQLDatabaseDirectory): Deleted.
+        (WebKit::WebProcessPool::legacyPlatformDefaultIndexedDBDatabaseDirectory): Deleted.
+        (WebKit::WebProcessPool::legacyPlatformDefaultLocalStorageDirectory): Deleted.
+        (WebKit::WebProcessPool::legacyPlatformDefaultMediaKeysStorageDirectory): Deleted.
+        (WebKit::WebProcessPool::legacyPlatformDefaultNetworkCacheDirectory): Deleted.
+        (WebKit::WebProcessPool::legacyPlatformDefaultJavaScriptConfigurationDirectory): Deleted.
+
 2018-08-22  John Wilander  <wilander@apple.com>
 
         The Storage Access API prompt should show the eTLD+1s, not the full host names
index af167de..14fa8d6 100644 (file)
@@ -38,22 +38,12 @@ Ref<ProcessPoolConfiguration> ProcessPoolConfiguration::create()
 
 Ref<ProcessPoolConfiguration> ProcessPoolConfiguration::createWithLegacyOptions()
 {
-    auto configuration = ProcessPoolConfiguration::create();
+    auto configuration = ProcessPoolConfiguration::createWithWebsiteDataStoreConfiguration(WebsiteDataStore::legacyDefaultDataStoreConfiguration());
 
     configuration->m_shouldHaveLegacyDataStore = true;
     configuration->m_maximumProcessCount = 1;
     configuration->m_cacheModel = WebKit::CacheModelDocumentViewer;
 
-    configuration->m_applicationCacheDirectory = WebKit::WebProcessPool::legacyPlatformDefaultApplicationCacheDirectory();
-    configuration->m_applicationCacheFlatFileSubdirectoryName = "ApplicationCache";
-    configuration->m_diskCacheDirectory = WebKit::WebProcessPool::legacyPlatformDefaultNetworkCacheDirectory();
-    configuration->m_mediaCacheDirectory = WebKit::WebProcessPool::legacyPlatformDefaultMediaCacheDirectory();
-    configuration->m_indexedDBDatabaseDirectory = WebKit::WebProcessPool::legacyPlatformDefaultIndexedDBDatabaseDirectory();
-    configuration->m_localStorageDirectory = WebKit::WebProcessPool::legacyPlatformDefaultLocalStorageDirectory();
-    configuration->m_mediaKeysStorageDirectory = WebKit::WebProcessPool::legacyPlatformDefaultMediaKeysStorageDirectory();
-    configuration->m_webSQLDatabaseDirectory = WebKit::WebProcessPool::legacyPlatformDefaultWebSQLDatabaseDirectory();
-    configuration->m_javaScriptConfigurationDirectory = WebKit::WebProcessPool::legacyPlatformDefaultJavaScriptConfigurationDirectory();
-
     return configuration;
 }
 
@@ -65,7 +55,7 @@ Ref<ProcessPoolConfiguration> ProcessPoolConfiguration::createWithWebsiteDataSto
     configuration->m_applicationCacheFlatFileSubdirectoryName = legacyConfiguration.applicationCacheFlatFileSubdirectoryName;
     configuration->m_diskCacheDirectory = legacyConfiguration.networkCacheDirectory;
     configuration->m_mediaCacheDirectory = legacyConfiguration.mediaCacheDirectory;
-    configuration->m_indexedDBDatabaseDirectory = WebKit::WebProcessPool::legacyPlatformDefaultIndexedDBDatabaseDirectory();
+    configuration->m_indexedDBDatabaseDirectory = WebsiteDataStore::legacyDefaultIndexedDBDatabaseDirectory();
     configuration->m_localStorageDirectory = legacyConfiguration.localStorageDirectory;
     configuration->m_mediaKeysStorageDirectory = legacyConfiguration.mediaKeysStorageDirectory;
     configuration->m_resourceLoadStatisticsDirectory = legacyConfiguration.resourceLoadStatisticsDirectory;
index d0472c8..aba845a 100644 (file)
@@ -119,4 +119,19 @@ String WebsiteDataStore::defaultJavaScriptConfigurationDirectory()
 }
 #endif
 
-}
+WebKit::WebsiteDataStore::Configuration WebsiteDataStore::legacyDefaultDataStoreConfiguration()
+{
+    WebKit::WebsiteDataStore::Configuration configuration;
+    configuration.applicationCacheDirectory = legacyDefaultApplicationCacheDirectory();
+    configuration.applicationCacheFlatFileSubdirectoryName = "ApplicationCache";
+    configuration.networkCacheDirectory = legacyDefaultNetworkCacheDirectory();
+    configuration.mediaCacheDirectory = legacyDefaultMediaCacheDirectory();
+    configuration.mediaKeysStorageDirectory = legacyDefaultMediaKeysStorageDirectory();
+    configuration.indexedDBDatabaseDirectory = legacyDefaultIndexedDBDatabaseDirectory();
+    configuration.webSQLDatabaseDirectory = legacyDefaultWebSQLDatabaseDirectory();
+    configuration.javaScriptConfigurationDirectory = legacyDefaultJavaScriptConfigurationDirectory();
+    
+    return configuration;
+}
+
+} // namespace API
index 768555d..bfcbecf 100644 (file)
@@ -57,18 +57,27 @@ public:
     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();
+
 private:
     enum ShouldCreateDirectory { CreateDirectory, DontCreateDirectory };
 
index 14c5e36..e418396 100644 (file)
 #include "SandboxExtension.h"
 #include "SandboxUtilities.h"
 
+#include <Foundation/Foundation.h>
+#include <WebCore/FileSystem.h>
+
 #if PLATFORM(IOS)
 #import <WebCore/RuntimeApplicationChecks.h>
 #endif
 
 namespace API {
 
+NSString *WebDatabaseDirectoryDefaultsKey = @"WebDatabaseDirectory";
+NSString *WebStorageDirectoryDefaultsKey = @"WebKitLocalStorageDatabasePathPreferenceKey";
+NSString *WebKitMediaCacheDirectoryDefaultsKey = @"WebKitMediaCacheDirectory";
+NSString *WebKitMediaKeysStorageDirectoryDefaultsKey = @"WebKitMediaKeysStorageDirectory";
+
 String WebsiteDataStore::defaultApplicationCacheDirectory()
 {
 #if PLATFORM(IOS)
@@ -102,6 +110,113 @@ String WebsiteDataStore::defaultJavaScriptConfigurationDirectory()
     return tempDirectoryFileSystemRepresentation("JavaScriptCoreDebug", DontCreateDirectory);
 }
 
+String WebsiteDataStore::legacyDefaultApplicationCacheDirectory()
+{
+    NSString *appName = [[NSBundle mainBundle] bundleIdentifier];
+    if (!appName)
+        appName = [[NSProcessInfo processInfo] processName];
+#if PLATFORM(IOS)
+    // This quirk used to make these apps share application cache storage, but doesn't accomplish that any more.
+    // Preserving it avoids the need to migrate data when upgrading.
+    if (WebCore::IOSApplication::isMobileSafari() || WebCore::IOSApplication::isWebApp())
+        appName = @"com.apple.WebAppCache";
+#endif
+    
+    ASSERT(appName);
+    
+#if PLATFORM(IOS)
+    NSString *cacheDir = [NSHomeDirectory() stringByAppendingPathComponent:@"Library/Caches"];
+#else
+    char cacheDirectory[MAXPATHLEN];
+    size_t cacheDirectoryLen = confstr(_CS_DARWIN_USER_CACHE_DIR, cacheDirectory, MAXPATHLEN);
+    if (!cacheDirectoryLen)
+        return String();
+    
+    NSString *cacheDir = [[NSFileManager defaultManager] stringWithFileSystemRepresentation:cacheDirectory length:cacheDirectoryLen - 1];
+#endif
+    NSString* cachePath = [cacheDir stringByAppendingPathComponent:appName];
+    return WebKit::stringByResolvingSymlinksInPath([cachePath stringByStandardizingPath]);
+}
+
+String WebsiteDataStore::legacyDefaultNetworkCacheDirectory()
+{
+    NSString *cachePath = CFBridgingRelease(_CFURLCacheCopyCacheDirectory([[NSURLCache sharedURLCache] _CFURLCache]));
+    if (!cachePath)
+        cachePath = @"~/Library/Caches/com.apple.WebKit.WebProcess";
+    
+    cachePath = [cachePath stringByAppendingPathComponent:@"WebKitCache"];
+    
+    return WebKit::stringByResolvingSymlinksInPath([cachePath stringByStandardizingPath]);
+}
+
+String WebsiteDataStore::legacyDefaultWebSQLDatabaseDirectory()
+{
+    NSString *databasesDirectory = [[NSUserDefaults standardUserDefaults] objectForKey:WebDatabaseDirectoryDefaultsKey];
+    if (!databasesDirectory || ![databasesDirectory isKindOfClass:[NSString class]])
+        databasesDirectory = @"~/Library/WebKit/Databases";
+    return WebKit::stringByResolvingSymlinksInPath([databasesDirectory stringByStandardizingPath]);
+}
+
+String WebsiteDataStore::legacyDefaultIndexedDBDatabaseDirectory()
+{
+    // Indexed databases exist in a subdirectory of the "database directory path."
+    // Currently, the top level of that directory contains entities related to WebSQL databases.
+    // We should fix this, and move WebSQL into a subdirectory (https://bugs.webkit.org/show_bug.cgi?id=124807)
+    // In the meantime, an entity name prefixed with three underscores will not conflict with any WebSQL entities.
+    return WebCore::FileSystem::pathByAppendingComponent(legacyDefaultWebSQLDatabaseDirectory(), "___IndexedDB");
+}
+
+String WebsiteDataStore::legacyDefaultLocalStorageDirectory()
+{
+    NSString *localStorageDirectory = [[NSUserDefaults standardUserDefaults] objectForKey:WebStorageDirectoryDefaultsKey];
+    if (!localStorageDirectory || ![localStorageDirectory isKindOfClass:[NSString class]])
+        localStorageDirectory = @"~/Library/WebKit/LocalStorage";
+    return WebKit::stringByResolvingSymlinksInPath([localStorageDirectory stringByStandardizingPath]);
+}
+
+String WebsiteDataStore::legacyDefaultMediaCacheDirectory()
+{
+    NSString *mediaKeysCacheDirectory = [[NSUserDefaults standardUserDefaults] objectForKey:WebKitMediaCacheDirectoryDefaultsKey];
+    if (!mediaKeysCacheDirectory || ![mediaKeysCacheDirectory isKindOfClass:[NSString class]]) {
+        mediaKeysCacheDirectory = NSTemporaryDirectory();
+        
+        if (!WebKit::processHasContainer()) {
+            NSString *bundleIdentifier = [NSBundle mainBundle].bundleIdentifier;
+            if (!bundleIdentifier)
+                bundleIdentifier = [NSProcessInfo processInfo].processName;
+            mediaKeysCacheDirectory = [mediaKeysCacheDirectory stringByAppendingPathComponent:bundleIdentifier];
+        }
+        mediaKeysCacheDirectory = [mediaKeysCacheDirectory stringByAppendingPathComponent:@"WebKit/MediaCache"];
+    }
+    return WebKit::stringByResolvingSymlinksInPath([mediaKeysCacheDirectory stringByStandardizingPath]);
+}
+
+String WebsiteDataStore::legacyDefaultMediaKeysStorageDirectory()
+{
+    NSString *mediaKeysStorageDirectory = [[NSUserDefaults standardUserDefaults] objectForKey:WebKitMediaKeysStorageDirectoryDefaultsKey];
+    if (!mediaKeysStorageDirectory || ![mediaKeysStorageDirectory isKindOfClass:[NSString class]])
+        mediaKeysStorageDirectory = @"~/Library/WebKit/MediaKeys";
+    return WebKit::stringByResolvingSymlinksInPath([mediaKeysStorageDirectory stringByStandardizingPath]);
+}
+
+String WebsiteDataStore::legacyDefaultJavaScriptConfigurationDirectory()
+{
+#if PLATFORM(IOS)
+    String path = WebKit::pathForProcessContainer();
+    if (path.isEmpty())
+        path = NSHomeDirectory();
+    
+    path = path + "/Library/WebKit/JavaScriptCoreDebug";
+    path = WebKit::stringByResolvingSymlinksInPath(path);
+    
+    return path;
+#else
+    RetainPtr<NSString> javaScriptConfigPath = @"~/Library/WebKit/JavaScriptCoreDebug";
+    
+    return WebKit::stringByResolvingSymlinksInPath([javaScriptConfigPath stringByStandardizingPath]);
+#endif
+}
+
 String WebsiteDataStore::tempDirectoryFileSystemRepresentation(const String& directoryName, ShouldCreateDirectory shouldCreateDirectory)
 {
     static dispatch_once_t onceToken;
@@ -209,4 +324,4 @@ WebKit::WebsiteDataStore::Configuration WebsiteDataStore::defaultDataStoreConfig
     return configuration;
 }
 
-}
+} // namespace API
index 5ee01c2..d8b13e7 100644 (file)
@@ -93,6 +93,75 @@ String WebsiteDataStore::websiteDataDirectoryFileSystemRepresentation(const Stri
     return WebCore::FileSystem::pathByAppendingComponent(WebCore::FileSystem::stringFromFileSystemRepresentation(g_get_user_data_dir()), directoryName);
 }
 
+String WebsiteDataStore::legacyDefaultApplicationCacheDirectory()
+{
+#if PLATFORM(WPE)
+    GUniquePtr<gchar> cacheDirectory(g_build_filename(g_get_user_cache_dir(), "wpe", "appcache", nullptr));
+    return WebCore::FileSystem::stringFromFileSystemRepresentation(cacheDirectory.get());
+#endif
+    return defaultApplicationCacheDirectory();
+}
+
+String WebsiteDataStore::legacyDefaultNetworkCacheDirectory()
+{
+#if PLATFORM(WPE)
+    GUniquePtr<char> diskCacheDirectory(g_build_filename(g_get_user_cache_dir(), "wpe", "cache", nullptr));
+    return WebCore::FileSystem::stringFromFileSystemRepresentation(diskCacheDirectory.get());
+#endif
+    return defaultNetworkCacheDirectory();
+}
+
+String WebsiteDataStore::legacyDefaultWebSQLDatabaseDirectory()
+{
+#if PLATFORM(WPE)
+    GUniquePtr<gchar> databaseDirectory(g_build_filename(g_get_user_data_dir(), "wpe", "databases", nullptr));
+    return WebCore::FileSystem::stringFromFileSystemRepresentation(databaseDirectory.get());
+#endif
+    return defaultWebSQLDatabaseDirectory();
+}
+
+String WebsiteDataStore::legacyDefaultIndexedDBDatabaseDirectory()
+{
+#if PLATFORM(WPE)
+    GUniquePtr<gchar> indexedDBDatabaseDirectory(g_build_filename(g_get_user_data_dir(), "wpe", "databases", "indexeddb", nullptr));
+    return WebCore::FileSystem::stringFromFileSystemRepresentation(indexedDBDatabaseDirectory.get());
+#endif
+    return defaultIndexedDBDatabaseDirectory();
+}
+
+String WebsiteDataStore::legacyDefaultLocalStorageDirectory()
+{
+#if PLATFORM(WPE)
+    GUniquePtr<gchar> storageDirectory(g_build_filename(g_get_user_data_dir(), "wpe", "localstorage", nullptr));
+    return WebCore::FileSystem::stringFromFileSystemRepresentation(storageDirectory.get());
+#endif
+    return defaultLocalStorageDirectory();
+}
+
+String WebsiteDataStore::legacyDefaultMediaCacheDirectory()
+{
+#if PLATFORM(WPE)
+    GUniquePtr<gchar> cacheDirectory(g_build_filename(g_get_user_cache_dir(), "wpe", "mediacache", nullptr));
+    return WebCore::FileSystem::stringFromFileSystemRepresentation(cacheDirectory.get());
+#endif
+    return defaultMediaCacheDirectory();
+}
+
+String WebsiteDataStore::legacyDefaultMediaKeysStorageDirectory()
+{
+#if PLATFORM(WPE)
+    GUniquePtr<gchar> mediaKeysStorageDirectory(g_build_filename(g_get_user_data_dir(), "wpe", "mediakeys", nullptr));
+    return WebCore::FileSystem::stringFromFileSystemRepresentation(mediaKeysStorageDirectory.get());
+#endif
+    return defaultMediaKeysStorageDirectory();
+}
+
+String WebsiteDataStore::legacyDefaultJavaScriptConfigurationDirectory()
+{
+    GUniquePtr<gchar> javaScriptCoreConfigDirectory(g_build_filename(g_get_user_data_dir(), BASE_DIRECTORY, "JavaScriptCoreDebug", nullptr));
+    return WebCore::FileSystem::stringFromFileSystemRepresentation(javaScriptCoreConfigDirectory.get());
+}
+
 WebKit::WebsiteDataStore::Configuration WebsiteDataStore::defaultDataStoreConfiguration()
 {
     WebKit::WebsiteDataStore::Configuration configuration;
index eafa470..50df2aa 100644 (file)
@@ -85,6 +85,46 @@ String WebsiteDataStore::websiteDataDirectoryFileSystemRepresentation(const Stri
     return WebCore::FileSystem::pathByAppendingComponent(WebCore::FileSystem::localUserSpecificStorageDirectory(), directoryName);
 }
 
+String WebsiteDataStore::legacyDefaultApplicationCacheDirectory()
+{
+    return WebCore::FileSystem::pathByAppendingComponent(WebCore::FileSystem::localUserSpecificStorageDirectory(), "ApplicationCache");
+}
+
+String WebsiteDataStore::legacyDefaultNetworkCacheDirectory()
+{
+    return WebCore::FileSystem::pathByAppendingComponent(WebCore::FileSystem::localUserSpecificStorageDirectory(), "NetworkCache");
+}
+
+String WebsiteDataStore::legacyDefaultWebSQLDatabaseDirectory()
+{
+    return WebCore::FileSystem::pathByAppendingComponent(WebCore::FileSystem::localUserSpecificStorageDirectory(), "WebSQL");
+}
+
+String WebsiteDataStore::legacyDefaultIndexedDBDatabaseDirectory()
+{
+    return WebCore::FileSystem::pathByAppendingComponent(WebCore::FileSystem::localUserSpecificStorageDirectory(), "IndexedDB");
+}
+
+String WebsiteDataStore::legacyDefaultLocalStorageDirectory()
+{
+    return WebCore::FileSystem::pathByAppendingComponent(WebCore::FileSystem::localUserSpecificStorageDirectory(), "LocalStorage");
+}
+
+String WebsiteDataStore::legacyDefaultMediaCacheDirectory()
+{
+    return WebCore::FileSystem::pathByAppendingComponent(WebCore::FileSystem::localUserSpecificStorageDirectory(), "MediaCache");
+}
+
+String WebsiteDataStore::legacyDefaultMediaKeysStorageDirectory()
+{
+    return WebCore::FileSystem::pathByAppendingComponent(WebCore::FileSystem::localUserSpecificStorageDirectory(), "MediaKeyStorage");
+}
+
+String WebsiteDataStore::legacyDefaultJavaScriptConfigurationDirectory()
+{
+    return WebCore::FileSystem::pathByAppendingComponent(WebCore::FileSystem::localUserSpecificStorageDirectory(), "JavaScriptCoreDebug");
+}
+
 WebKit::WebsiteDataStore::Configuration WebsiteDataStore::defaultDataStoreConfiguration()
 {
     WebKit::WebsiteDataStore::Configuration configuration;
index 232273f..e19f04d 100644 (file)
 
 using namespace WebCore;
 
-NSString *WebDatabaseDirectoryDefaultsKey = @"WebDatabaseDirectory";
 NSString *WebServiceWorkerRegistrationDirectoryDefaultsKey = @"WebServiceWorkerRegistrationDirectory";
 NSString *WebKitLocalCacheDefaultsKey = @"WebKitLocalCache";
-NSString *WebStorageDirectoryDefaultsKey = @"WebKitLocalStorageDatabasePathPreferenceKey";
 NSString *WebKitJSCJITEnabledDefaultsKey = @"WebKitJSCJITEnabledDefaultsKey";
 NSString *WebKitJSCFTLJITEnabledDefaultsKey = @"WebKitJSCFTLJITEnabledDefaultsKey";
-NSString *WebKitMediaKeysStorageDirectoryDefaultsKey = @"WebKitMediaKeysStorageDirectory";
-NSString *WebKitMediaCacheDirectoryDefaultsKey = @"WebKitMediaCacheDirectory";
 
 #if !PLATFORM(IOS)
 static NSString *WebKitApplicationDidChangeAccessibilityEnhancedUserInterfaceNotification = @"NSApplicationDidChangeAccessibilityEnhancedUserInterfaceNotification";
@@ -393,121 +389,6 @@ String WebProcessPool::containerTemporaryDirectory() const
 }
 #endif
 
-String WebProcessPool::legacyPlatformDefaultWebSQLDatabaseDirectory()
-{
-    registerUserDefaultsIfNeeded();
-
-    NSString *databasesDirectory = [[NSUserDefaults standardUserDefaults] objectForKey:WebDatabaseDirectoryDefaultsKey];
-    if (!databasesDirectory || ![databasesDirectory isKindOfClass:[NSString class]])
-        databasesDirectory = @"~/Library/WebKit/Databases";
-    return stringByResolvingSymlinksInPath([databasesDirectory stringByStandardizingPath]);
-}
-
-String WebProcessPool::legacyPlatformDefaultIndexedDBDatabaseDirectory()
-{
-    // Indexed databases exist in a subdirectory of the "database directory path."
-    // Currently, the top level of that directory contains entities related to WebSQL databases.
-    // We should fix this, and move WebSQL into a subdirectory (https://bugs.webkit.org/show_bug.cgi?id=124807)
-    // In the meantime, an entity name prefixed with three underscores will not conflict with any WebSQL entities.
-    return FileSystem::pathByAppendingComponent(legacyPlatformDefaultWebSQLDatabaseDirectory(), "___IndexedDB");
-}
-
-String WebProcessPool::legacyPlatformDefaultLocalStorageDirectory()
-{
-    registerUserDefaultsIfNeeded();
-
-    NSString *localStorageDirectory = [[NSUserDefaults standardUserDefaults] objectForKey:WebStorageDirectoryDefaultsKey];
-    if (!localStorageDirectory || ![localStorageDirectory isKindOfClass:[NSString class]])
-        localStorageDirectory = @"~/Library/WebKit/LocalStorage";
-    return stringByResolvingSymlinksInPath([localStorageDirectory stringByStandardizingPath]);
-}
-
-String WebProcessPool::legacyPlatformDefaultMediaCacheDirectory()
-{
-    registerUserDefaultsIfNeeded();
-    
-    NSString *mediaKeysCacheDirectory = [[NSUserDefaults standardUserDefaults] objectForKey:WebKitMediaCacheDirectoryDefaultsKey];
-    if (!mediaKeysCacheDirectory || ![mediaKeysCacheDirectory isKindOfClass:[NSString class]]) {
-        mediaKeysCacheDirectory = NSTemporaryDirectory();
-        
-        if (!WebKit::processHasContainer()) {
-            NSString *bundleIdentifier = [NSBundle mainBundle].bundleIdentifier;
-            if (!bundleIdentifier)
-                bundleIdentifier = [NSProcessInfo processInfo].processName;
-            mediaKeysCacheDirectory = [mediaKeysCacheDirectory stringByAppendingPathComponent:bundleIdentifier];
-        }
-        mediaKeysCacheDirectory = [mediaKeysCacheDirectory stringByAppendingPathComponent:@"WebKit/MediaCache"];
-    }
-    return stringByResolvingSymlinksInPath([mediaKeysCacheDirectory stringByStandardizingPath]);
-}
-
-String WebProcessPool::legacyPlatformDefaultMediaKeysStorageDirectory()
-{
-    registerUserDefaultsIfNeeded();
-
-    NSString *mediaKeysStorageDirectory = [[NSUserDefaults standardUserDefaults] objectForKey:WebKitMediaKeysStorageDirectoryDefaultsKey];
-    if (!mediaKeysStorageDirectory || ![mediaKeysStorageDirectory isKindOfClass:[NSString class]])
-        mediaKeysStorageDirectory = @"~/Library/WebKit/MediaKeys";
-    return stringByResolvingSymlinksInPath([mediaKeysStorageDirectory stringByStandardizingPath]);
-}
-
-String WebProcessPool::legacyPlatformDefaultApplicationCacheDirectory()
-{
-    NSString *appName = [[NSBundle mainBundle] bundleIdentifier];
-    if (!appName)
-        appName = [[NSProcessInfo processInfo] processName];
-#if PLATFORM(IOS)
-    // This quirk used to make these apps share application cache storage, but doesn't accomplish that any more.
-    // Preserving it avoids the need to migrate data when upgrading.
-    if (IOSApplication::isMobileSafari() || IOSApplication::isWebApp())
-        appName = @"com.apple.WebAppCache";
-#endif
-
-    ASSERT(appName);
-
-#if PLATFORM(IOS)
-    NSString *cacheDir = [NSHomeDirectory() stringByAppendingPathComponent:@"Library/Caches"];
-#else
-    char cacheDirectory[MAXPATHLEN];
-    size_t cacheDirectoryLen = confstr(_CS_DARWIN_USER_CACHE_DIR, cacheDirectory, MAXPATHLEN);
-    if (!cacheDirectoryLen)
-        return String();
-
-    NSString *cacheDir = [[NSFileManager defaultManager] stringWithFileSystemRepresentation:cacheDirectory length:cacheDirectoryLen - 1];
-#endif
-    NSString* cachePath = [cacheDir stringByAppendingPathComponent:appName];
-    return stringByResolvingSymlinksInPath([cachePath stringByStandardizingPath]);
-}
-
-String WebProcessPool::legacyPlatformDefaultNetworkCacheDirectory()
-{
-    NSString *cachePath = CFBridgingRelease(_CFURLCacheCopyCacheDirectory([[NSURLCache sharedURLCache] _CFURLCache]));
-    if (!cachePath)
-        cachePath = @"~/Library/Caches/com.apple.WebKit.WebProcess";
-
-    cachePath = [cachePath stringByAppendingPathComponent:@"WebKitCache"];
-
-    return stringByResolvingSymlinksInPath([cachePath stringByStandardizingPath]);
-}
-
-String WebProcessPool::legacyPlatformDefaultJavaScriptConfigurationDirectory()
-{
-#if PLATFORM(IOS)
-    String path = pathForProcessContainer();
-    if (path.isEmpty())
-        path = NSHomeDirectory();
-    
-    path = path + "/Library/WebKit/JavaScriptCoreDebug";
-    path = stringByResolvingSymlinksInPath(path);
-
-    return path;
-#else
-    RetainPtr<NSString> javaScriptConfigPath = @"~/Library/WebKit/JavaScriptCoreDebug";
-    
-    return stringByResolvingSymlinksInPath([javaScriptConfigPath stringByStandardizingPath]);
-#endif
-}
-
 #if PLATFORM(IOS)
 void WebProcessPool::setJavaScriptConfigurationFileEnabledFromDefaults()
 {
index 6a29140..08ddb1f 100644 (file)
@@ -417,16 +417,6 @@ public:
         return m_hiddenPageThrottlingAutoIncreasesCounter.count();
     }
 
-    // FIXME: Move these to API::WebsiteDataStore.
-    static String legacyPlatformDefaultLocalStorageDirectory();
-    static String legacyPlatformDefaultIndexedDBDatabaseDirectory();
-    static String legacyPlatformDefaultWebSQLDatabaseDirectory();
-    static String legacyPlatformDefaultMediaKeysStorageDirectory();
-    static String legacyPlatformDefaultMediaCacheDirectory();
-    static String legacyPlatformDefaultApplicationCacheDirectory();
-    static String legacyPlatformDefaultNetworkCacheDirectory();
-    static String legacyPlatformDefaultJavaScriptConfigurationDirectory();
-
     void setResourceLoadStatisticsEnabled(bool);
     void clearResourceLoadStatistics();
 
index adedb98..3d04453 100644 (file)
@@ -77,16 +77,6 @@ void WebProcessPool::platformInitialize()
 #endif
 }
 
-WTF::String WebProcessPool::legacyPlatformDefaultApplicationCacheDirectory()
-{
-    return API::WebsiteDataStore::defaultApplicationCacheDirectory();
-}
-
-WTF::String WebProcessPool::legacyPlatformDefaultMediaCacheDirectory()
-{
-    return API::WebsiteDataStore::defaultMediaCacheDirectory();
-}
-
 void WebProcessPool::platformInitializeWebProcess(WebProcessCreationParameters& parameters)
 {
     parameters.memoryCacheDisabled = m_memoryCacheDisabled || cacheModel() == CacheModelDocumentViewer;
@@ -110,37 +100,6 @@ void WebProcessPool::platformInvalidateContext()
 {
 }
 
-String WebProcessPool::legacyPlatformDefaultWebSQLDatabaseDirectory()
-{
-    return API::WebsiteDataStore::defaultWebSQLDatabaseDirectory();
-}
-
-String WebProcessPool::legacyPlatformDefaultIndexedDBDatabaseDirectory()
-{
-    return API::WebsiteDataStore::defaultIndexedDBDatabaseDirectory();
-}
-
-String WebProcessPool::legacyPlatformDefaultLocalStorageDirectory()
-{
-    return API::WebsiteDataStore::defaultLocalStorageDirectory();
-}
-
-String WebProcessPool::legacyPlatformDefaultMediaKeysStorageDirectory()
-{
-    return API::WebsiteDataStore::defaultMediaKeysStorageDirectory();
-}
-
-String WebProcessPool::legacyPlatformDefaultNetworkCacheDirectory()
-{
-    return API::WebsiteDataStore::defaultNetworkCacheDirectory();
-}
-
-String WebProcessPool::legacyPlatformDefaultJavaScriptConfigurationDirectory()
-{
-    GUniquePtr<gchar> javaScriptCoreConfigDirectory(g_build_filename(g_get_user_data_dir(), "webkitgtk", "JavaScriptCoreDebug", nullptr));
-    return WebCore::FileSystem::stringFromFileSystemRepresentation(javaScriptCoreConfigDirectory.get());
-}
-
 void WebProcessPool::platformResolvePathsForSandboxExtensions()
 {
 }
index a88b53f..1015ff0 100644 (file)
@@ -53,46 +53,6 @@ void WebProcessPool::platformInvalidateContext()
     notImplemented();
 }
 
-String WebProcessPool::legacyPlatformDefaultApplicationCacheDirectory()
-{
-    return WebCore::FileSystem::pathByAppendingComponent(WebCore::FileSystem::localUserSpecificStorageDirectory(), "ApplicationCache");
-}
-
-String WebProcessPool::legacyPlatformDefaultMediaCacheDirectory()
-{
-    return WebCore::FileSystem::pathByAppendingComponent(WebCore::FileSystem::localUserSpecificStorageDirectory(), "MediaCache");
-}
-
-String WebProcessPool::legacyPlatformDefaultWebSQLDatabaseDirectory()
-{
-    return WebCore::FileSystem::pathByAppendingComponent(WebCore::FileSystem::localUserSpecificStorageDirectory(), "WebSQL");
-}
-
-String WebProcessPool::legacyPlatformDefaultIndexedDBDatabaseDirectory()
-{
-    return WebCore::FileSystem::pathByAppendingComponent(WebCore::FileSystem::localUserSpecificStorageDirectory(), "IndexedDB");
-}
-
-String WebProcessPool::legacyPlatformDefaultLocalStorageDirectory()
-{
-    return WebCore::FileSystem::pathByAppendingComponent(WebCore::FileSystem::localUserSpecificStorageDirectory(), "LocalStorage");
-}
-
-String WebProcessPool::legacyPlatformDefaultMediaKeysStorageDirectory()
-{
-    return WebCore::FileSystem::pathByAppendingComponent(WebCore::FileSystem::localUserSpecificStorageDirectory(), "MediaKeyStorage");
-}
-
-String WebProcessPool::legacyPlatformDefaultNetworkCacheDirectory()
-{
-    return WebCore::FileSystem::pathByAppendingComponent(WebCore::FileSystem::localUserSpecificStorageDirectory(), "NetworkCache");
-}
-
-String WebProcessPool::legacyPlatformDefaultJavaScriptConfigurationDirectory()
-{
-    return WebCore::FileSystem::pathByAppendingComponent(WebCore::FileSystem::localUserSpecificStorageDirectory(), "JavaScriptCoreDebug");
-}
-
 void WebProcessPool::platformResolvePathsForSandboxExtensions()
 {
 }
index 7cb8951..c03e4e8 100644 (file)
@@ -78,18 +78,6 @@ void WebProcessPool::platformInitialize()
 #endif
 }
 
-WTF::String WebProcessPool::legacyPlatformDefaultApplicationCacheDirectory()
-{
-    GUniquePtr<gchar> cacheDirectory(g_build_filename(g_get_user_cache_dir(), "wpe", "appcache", nullptr));
-    return WebCore::FileSystem::stringFromFileSystemRepresentation(cacheDirectory.get());
-}
-
-WTF::String WebProcessPool::legacyPlatformDefaultMediaCacheDirectory()
-{
-    GUniquePtr<gchar> cacheDirectory(g_build_filename(g_get_user_cache_dir(), "wpe", "mediacache", nullptr));
-    return WebCore::FileSystem::stringFromFileSystemRepresentation(cacheDirectory.get());
-}
-
 void WebProcessPool::platformInitializeWebProcess(WebProcessCreationParameters& parameters)
 {
     parameters.memoryCacheDisabled = m_memoryCacheDisabled || cacheModel() == CacheModelDocumentViewer;
@@ -109,42 +97,6 @@ void WebProcessPool::platformInvalidateContext()
     notImplemented();
 }
 
-String WebProcessPool::legacyPlatformDefaultWebSQLDatabaseDirectory()
-{
-    GUniquePtr<gchar> databaseDirectory(g_build_filename(g_get_user_data_dir(), "wpe", "databases", nullptr));
-    return WebCore::FileSystem::stringFromFileSystemRepresentation(databaseDirectory.get());
-}
-
-String WebProcessPool::legacyPlatformDefaultIndexedDBDatabaseDirectory()
-{
-    GUniquePtr<gchar> indexedDBDatabaseDirectory(g_build_filename(g_get_user_data_dir(), "wpe", "databases", "indexeddb", nullptr));
-    return WebCore::FileSystem::stringFromFileSystemRepresentation(indexedDBDatabaseDirectory.get());
-}
-
-String WebProcessPool::legacyPlatformDefaultLocalStorageDirectory()
-{
-    GUniquePtr<gchar> storageDirectory(g_build_filename(g_get_user_data_dir(), "wpe", "localstorage", nullptr));
-    return WebCore::FileSystem::stringFromFileSystemRepresentation(storageDirectory.get());
-}
-
-String WebProcessPool::legacyPlatformDefaultMediaKeysStorageDirectory()
-{
-    GUniquePtr<gchar> mediaKeysStorageDirectory(g_build_filename(g_get_user_data_dir(), "wpe", "mediakeys", nullptr));
-    return WebCore::FileSystem::stringFromFileSystemRepresentation(mediaKeysStorageDirectory.get());
-}
-
-String WebProcessPool::legacyPlatformDefaultNetworkCacheDirectory()
-{
-    GUniquePtr<char> diskCacheDirectory(g_build_filename(g_get_user_cache_dir(), "wpe", "cache", nullptr));
-    return WebCore::FileSystem::stringFromFileSystemRepresentation(diskCacheDirectory.get());
-}
-
-String WebProcessPool::legacyPlatformDefaultJavaScriptConfigurationDirectory()
-{
-    GUniquePtr<gchar> javaScriptCoreConfigDirectory(g_build_filename(g_get_user_data_dir(), "wpe", "JavaScriptCoreDebug", nullptr));
-    return WebCore::FileSystem::stringFromFileSystemRepresentation(javaScriptCoreConfigDirectory.get());
-}
-
 void WebProcessPool::platformResolvePathsForSandboxExtensions()
 {
 }