[Curl] Remove unnecessary member from NetworkStorageSession.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 1 Feb 2019 05:53:06 +0000 (05:53 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 1 Feb 2019 05:53:06 +0000 (05:53 +0000)
https://bugs.webkit.org/show_bug.cgi?id=194137

Patch by Takashi Komori <Takashi.Komori@sony.com> on 2019-01-31
Reviewed by Don Olmstead.

Source/WebCore:

No new tests since there is no behavior change.

* platform/network/NetworkStorageSession.h:
* platform/network/curl/NetworkStorageSessionCurl.cpp:
(WebCore::NetworkStorageSession::NetworkStorageSession):
(WebCore::NetworkStorageSession::context const): Deleted.

Source/WebKit:

* NetworkProcess/curl/NetworkProcessCurl.cpp:
(WebKit::NetworkProcess::platformCreateDefaultStorageSession const):

Source/WebKitLegacy:

* WebCoreSupport/NetworkStorageSessionMap.cpp:
(NetworkStorageSessionMap::defaultStorageSession):
(NetworkStorageSessionMap::ensureSession):

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

Source/WebCore/ChangeLog
Source/WebCore/platform/network/NetworkStorageSession.h
Source/WebCore/platform/network/curl/NetworkStorageSessionCurl.cpp
Source/WebKit/ChangeLog
Source/WebKit/NetworkProcess/curl/NetworkProcessCurl.cpp
Source/WebKitLegacy/ChangeLog
Source/WebKitLegacy/WebCoreSupport/NetworkStorageSessionMap.cpp

index 6e066c9..d495c62 100644 (file)
@@ -1,3 +1,17 @@
+2019-01-31  Takashi Komori  <Takashi.Komori@sony.com>
+
+        [Curl] Remove unnecessary member from NetworkStorageSession.
+        https://bugs.webkit.org/show_bug.cgi?id=194137
+
+        Reviewed by Don Olmstead.
+
+        No new tests since there is no behavior change.
+
+        * platform/network/NetworkStorageSession.h:
+        * platform/network/curl/NetworkStorageSessionCurl.cpp:
+        (WebCore::NetworkStorageSession::NetworkStorageSession):
+        (WebCore::NetworkStorageSession::context const): Deleted.
+
 2019-01-31  Jer Noble  <jer.noble@apple.com>
 
         NSInvalidArgumentException in [WebAVSampleBufferErrorListener observeValueForKeyPath:ofObject:change:context:]
index 0789687..014e1c6 100644 (file)
@@ -105,7 +105,7 @@ public:
     void getCredentialFromPersistentStorage(const ProtectionSpace&, GCancellable*, Function<void (Credential&&)>&& completionHandler);
     void saveCredentialToPersistentStorage(const ProtectionSpace&, const Credential&);
 #elif USE(CURL)
-    WEBCORE_EXPORT NetworkStorageSession(PAL::SessionID, NetworkingContext*);
+    WEBCORE_EXPORT NetworkStorageSession(PAL::SessionID);
     ~NetworkStorageSession();
 
     const CookieJarCurl& cookieStorage() const { return m_cookieStorage; };
@@ -113,8 +113,6 @@ public:
     WEBCORE_EXPORT void setCookieDatabase(UniqueRef<CookieJarDB>&&);
 
     WEBCORE_EXPORT void setProxySettings(CurlProxySettings&&);
-
-    NetworkingContext* context() const;
 #else
     WEBCORE_EXPORT NetworkStorageSession(PAL::SessionID, NetworkingContext*);
     ~NetworkStorageSession();
@@ -169,8 +167,6 @@ private:
     mutable std::unique_ptr<SoupNetworkSession> m_session;
     Function<void ()> m_cookieObserverHandler;
 #elif USE(CURL)
-    RefPtr<NetworkingContext> m_context;
-
     UniqueRef<CookieJarCurl> m_cookieStorage;
     mutable UniqueRef<CookieJarDB> m_cookieDatabase;
 #else
index 05b5672..1ac4e02 100644 (file)
@@ -58,9 +58,8 @@ static String defaultCookieJarPath()
 #endif
 }
 
-NetworkStorageSession::NetworkStorageSession(PAL::SessionID sessionID, NetworkingContext* context)
+NetworkStorageSession::NetworkStorageSession(PAL::SessionID sessionID)
     : m_sessionID(sessionID)
-    , m_context(context)
     , m_cookieStorage(makeUniqueRef<CookieJarCurl>())
     , m_cookieDatabase(makeUniqueRef<CookieJarDB>(defaultCookieJarPath()))
 {
@@ -70,11 +69,6 @@ NetworkStorageSession::~NetworkStorageSession()
 {
 }
 
-NetworkingContext* NetworkStorageSession::context() const
-{
-    return m_context.get();
-}
-
 void NetworkStorageSession::setCookieDatabase(UniqueRef<CookieJarDB>&& cookieDatabase)
 {
     m_cookieDatabase = WTFMove(cookieDatabase);
index c2532a7..2b6b5f3 100644 (file)
@@ -1,3 +1,13 @@
+2019-01-31  Takashi Komori  <Takashi.Komori@sony.com>
+
+        [Curl] Remove unnecessary member from NetworkStorageSession.
+        https://bugs.webkit.org/show_bug.cgi?id=194137
+
+        Reviewed by Don Olmstead.
+
+        * NetworkProcess/curl/NetworkProcessCurl.cpp:
+        (WebKit::NetworkProcess::platformCreateDefaultStorageSession const):
+
 2019-01-31  Jiewen Tan  <jiewen_tan@apple.com>
 
         Unreviewed, build fix after r240805
index 91ffa49..be6801f 100644 (file)
@@ -41,7 +41,7 @@ void NetworkProcess::platformInitializeNetworkProcess(const NetworkProcessCreati
 
 std::unique_ptr<WebCore::NetworkStorageSession> NetworkProcess::platformCreateDefaultStorageSession() const
 {
-    return std::make_unique<WebCore::NetworkStorageSession>(PAL::SessionID::defaultSessionID(), nullptr);
+    return std::make_unique<WebCore::NetworkStorageSession>(PAL::SessionID::defaultSessionID());
 }
 
 void NetworkProcess::allowSpecificHTTPSCertificateForHost(const CertificateInfo& certificateInfo, const String& host)
index 174fb6b..97d7368 100644 (file)
@@ -1,5 +1,16 @@
 2019-01-31  Takashi Komori  <Takashi.Komori@sony.com>
 
+        [Curl] Remove unnecessary member from NetworkStorageSession.
+        https://bugs.webkit.org/show_bug.cgi?id=194137
+
+        Reviewed by Don Olmstead.
+
+        * WebCoreSupport/NetworkStorageSessionMap.cpp:
+        (NetworkStorageSessionMap::defaultStorageSession):
+        (NetworkStorageSessionMap::ensureSession):
+
+2019-01-31  Takashi Komori  <Takashi.Komori@sony.com>
+
         [Curl] Fix DRT crash related to private browsing.
         https://bugs.webkit.org/show_bug.cgi?id=193816
 
index e5ae807..43ea45d 100644 (file)
@@ -54,13 +54,8 @@ WebCore::NetworkStorageSession* NetworkStorageSessionMap::storageSession(const P
 
 WebCore::NetworkStorageSession& NetworkStorageSessionMap::defaultStorageSession()
 {
-    if (!defaultNetworkStorageSession()) {
-#if USE(CURL)
-        defaultNetworkStorageSession() = std::make_unique<WebCore::NetworkStorageSession>(PAL::SessionID::defaultSessionID(), nullptr);
-#else
+    if (!defaultNetworkStorageSession())
         defaultNetworkStorageSession() = std::make_unique<WebCore::NetworkStorageSession>(PAL::SessionID::defaultSessionID());
-#endif
-    }
     return *defaultNetworkStorageSession();
 }
 
@@ -109,7 +104,7 @@ void NetworkStorageSessionMap::ensureSession(const PAL::SessionID& sessionID, co
 
 #elif USE(CURL)
     globalSessionMap().ensure(sessionID, [sessionID] {
-        return std::make_unique<WebCore::NetworkStorageSession>(sessionID, nullptr);
+        return std::make_unique<WebCore::NetworkStorageSession>(sessionID);
     });
 #endif
 }