Remove redundant WebsiteDataStoreConfiguration member
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 16 Jul 2019 06:14:57 +0000 (06:14 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 16 Jul 2019 06:14:57 +0000 (06:14 +0000)
https://bugs.webkit.org/show_bug.cgi?id=199820

Patch by Alex Christensen <achristensen@webkit.org> on 2019-07-15
Reviewed by Geoffrey Garen.

m_webStorageDirectory was only used for _WKWebsiteDataStoreConfiguration._webStorageDirectory's backing,
which was copied over to m_localStorageDirectory of a new object in WKWebsiteDataStore's _initWithConfiguration.
This is a baby step towards cleaning up this mess with no behavior change.  I see no reason to rename the SPI.

* UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.mm:
(-[_WKWebsiteDataStoreConfiguration _webStorageDirectory]):
(-[_WKWebsiteDataStoreConfiguration _setWebStorageDirectory:]):
* UIProcess/WebsiteData/WebsiteDataStoreConfiguration.cpp:
(WebKit::WebsiteDataStoreConfiguration::copy):
* UIProcess/WebsiteData/WebsiteDataStoreConfiguration.h:
(WebKit::WebsiteDataStoreConfiguration::webStorageDirectory const): Deleted.
(WebKit::WebsiteDataStoreConfiguration::setWebStorageDirectory): Deleted.

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

Source/WebKit/ChangeLog
Source/WebKit/UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.mm
Source/WebKit/UIProcess/WebsiteData/WebsiteDataStoreConfiguration.cpp
Source/WebKit/UIProcess/WebsiteData/WebsiteDataStoreConfiguration.h

index 4b7371d..34f8098 100644 (file)
@@ -1,3 +1,23 @@
+2019-07-15  Alex Christensen  <achristensen@webkit.org>
+
+        Remove redundant WebsiteDataStoreConfiguration member
+        https://bugs.webkit.org/show_bug.cgi?id=199820
+
+        Reviewed by Geoffrey Garen.
+
+        m_webStorageDirectory was only used for _WKWebsiteDataStoreConfiguration._webStorageDirectory's backing,
+        which was copied over to m_localStorageDirectory of a new object in WKWebsiteDataStore's _initWithConfiguration.
+        This is a baby step towards cleaning up this mess with no behavior change.  I see no reason to rename the SPI.
+
+        * UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.mm:
+        (-[_WKWebsiteDataStoreConfiguration _webStorageDirectory]):
+        (-[_WKWebsiteDataStoreConfiguration _setWebStorageDirectory:]):
+        * UIProcess/WebsiteData/WebsiteDataStoreConfiguration.cpp:
+        (WebKit::WebsiteDataStoreConfiguration::copy):
+        * UIProcess/WebsiteData/WebsiteDataStoreConfiguration.h:
+        (WebKit::WebsiteDataStoreConfiguration::webStorageDirectory const): Deleted.
+        (WebKit::WebsiteDataStoreConfiguration::setWebStorageDirectory): Deleted.
+
 2019-07-15  Fujii Hironori  <Hironori.Fujii@sony.com>
 
         Make WKURLSchemeTask thread safe
index 267a3f5..59a3074 100644 (file)
@@ -65,7 +65,7 @@ static void checkURLArgument(NSURL *url)
 
 - (NSURL *)_webStorageDirectory
 {
-    return [NSURL fileURLWithPath:_configuration->webStorageDirectory() isDirectory:YES];
+    return [NSURL fileURLWithPath:_configuration->localStorageDirectory() isDirectory:YES];
 }
 
 - (void)_setWebStorageDirectory:(NSURL *)url
@@ -73,7 +73,7 @@ static void checkURLArgument(NSURL *url)
     if (!_configuration->isPersistent())
         [NSException raise:NSInvalidArgumentException format:@"Cannot set _webStorageDirectory on a non-persistent _WKWebsiteDataStoreConfiguration."];
     checkURLArgument(url);
-    _configuration->setWebStorageDirectory(url.path);
+    _configuration->setLocalStorageDirectory(url.path);
 }
 
 - (NSURL *)_indexedDBDatabaseDirectory
index aeb80cd..1b7f44d 100644 (file)
@@ -46,7 +46,6 @@ Ref<WebsiteDataStoreConfiguration> WebsiteDataStoreConfiguration::copy()
     copy->m_networkCacheDirectory = this->m_networkCacheDirectory;
     copy->m_applicationCacheDirectory = this->m_applicationCacheDirectory;
     copy->m_applicationCacheFlatFileSubdirectoryName = this->m_applicationCacheFlatFileSubdirectoryName;
-    copy->m_webStorageDirectory = this->m_webStorageDirectory;
     copy->m_mediaCacheDirectory = this->m_mediaCacheDirectory;
     copy->m_indexedDBDatabaseDirectory = this->m_indexedDBDatabaseDirectory;
     copy->m_serviceWorkerRegistrationDirectory = this->m_serviceWorkerRegistrationDirectory;
index ea3d8e2..d38ab72 100644 (file)
@@ -56,9 +56,6 @@ public:
     const String& javaScriptConfigurationDirectory() const { return m_javaScriptConfigurationDirectory; }
     void setJavaScriptConfigurationDirectory(String&& directory) { m_javaScriptConfigurationDirectory = WTFMove(directory); }
     
-    const String& webStorageDirectory() const { return m_webStorageDirectory; }
-    void setWebStorageDirectory(String&& directory) { m_webStorageDirectory = WTFMove(directory); }
-
     const String& indexedDBDatabaseDirectory() const { return m_indexedDBDatabaseDirectory; }
     void setIndexedDBDatabaseDirectory(String&& directory) { m_indexedDBDatabaseDirectory = WTFMove(directory); }
 
@@ -117,7 +114,6 @@ private:
     String m_networkCacheDirectory;
     String m_applicationCacheDirectory;
     String m_applicationCacheFlatFileSubdirectoryName;
-    String m_webStorageDirectory;
     String m_mediaCacheDirectory;
     String m_indexedDBDatabaseDirectory;
     String m_serviceWorkerRegistrationDirectory;