WinCairo build fix attempt.
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 11 Jun 2016 17:58:51 +0000 (17:58 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 11 Jun 2016 17:58:51 +0000 (17:58 +0000)
* platform/network/NetworkStorageSession.cpp:
* platform/network/NetworkStorageSession.h:
* platform/network/NetworkStorageSessionStub.cpp:
(WebCore::NetworkStorageSession::NetworkStorageSession):
(WebCore::NetworkStorageSession::context):
(WebCore::NetworkStorageSession::createPrivateBrowsingSession):
(WebCore::NetworkStorageSession::switchToNewTestingSession):
(WebCore::NetworkStorageSession::~NetworkStorageSession): Deleted.
(WebCore::defaultSession): Deleted.
(WebCore::NetworkStorageSession::defaultStorageSession): Deleted.

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

Source/WebCore/ChangeLog
Source/WebCore/platform/network/NetworkStorageSession.cpp
Source/WebCore/platform/network/NetworkStorageSession.h
Source/WebCore/platform/network/NetworkStorageSessionStub.cpp

index 2e58464..a740406 100644 (file)
@@ -1,3 +1,18 @@
+2016-06-11  Antti Koivisto  <antti@apple.com>
+
+        WinCairo build fix attempt.
+
+        * platform/network/NetworkStorageSession.cpp:
+        * platform/network/NetworkStorageSession.h:
+        * platform/network/NetworkStorageSessionStub.cpp:
+        (WebCore::NetworkStorageSession::NetworkStorageSession):
+        (WebCore::NetworkStorageSession::context):
+        (WebCore::NetworkStorageSession::createPrivateBrowsingSession):
+        (WebCore::NetworkStorageSession::switchToNewTestingSession):
+        (WebCore::NetworkStorageSession::~NetworkStorageSession): Deleted.
+        (WebCore::defaultSession): Deleted.
+        (WebCore::NetworkStorageSession::defaultStorageSession): Deleted.
+
 2016-06-11  Myles C. Maxfield  <mmaxfield@apple.com>
 
         Deleting a CSSOM style rule invalidates any previously-added FontFaces
index 8679776..7cc1b7e 100644 (file)
@@ -26,6 +26,7 @@
 #include "config.h"
 #include "NetworkStorageSession.h"
 
+#include "NetworkingContext.h"
 #include <wtf/HashMap.h>
 #include <wtf/MainThread.h>
 #include <wtf/NeverDestroyed.h>
index 7f394da..a7d203a 100644 (file)
@@ -66,6 +66,10 @@ public:
 
     SoupNetworkSession& soupNetworkSession() const;
     void setSoupNetworkSession(std::unique_ptr<SoupNetworkSession>);
+#else
+    NetworkStorageSession(SessionID, NetworkingContext*);
+
+    NetworkingContext* context() const;
 #endif
 
 private:
@@ -79,6 +83,8 @@ private:
     RetainPtr<CFURLStorageSessionRef> m_platformSession;
 #elif USE(SOUP)
     std::unique_ptr<SoupNetworkSession> m_session;
+#else
+    RefPtr<NetworkingContext> m_context;
 #endif
 
     CredentialStorage m_credentialStorage;
index 5925c4d..36c69c6 100644 (file)
 namespace WebCore {
 
 NetworkStorageSession::NetworkStorageSession(SessionID sessionID, NetworkingContext* context)
-    : m_sessionID(sessionID)
-    , m_context(context)
-{
-}
-
-NetworkStorageSession::~NetworkStorageSession()
+    : NetworkStorageSession(sessionID)
 {
+    m_context = context;
 }
 
 NetworkingContext* NetworkStorageSession::context() const
@@ -55,19 +51,6 @@ std::unique_ptr<NetworkStorageSession> NetworkStorageSession::createPrivateBrows
     return nullptr;
 }
 
-static std::unique_ptr<NetworkStorageSession>& defaultSession()
-{
-    static NeverDestroyed<std::unique_ptr<NetworkStorageSession>> session;
-    return session;
-}
-
-NetworkStorageSession& NetworkStorageSession::defaultStorageSession()
-{
-    if (!defaultSession())
-        defaultSession() = std::make_unique<NetworkStorageSession>(SessionID::defaultSessionID(), nullptr);
-    return *defaultSession();
-}
-
 void NetworkStorageSession::switchToNewTestingSession()
 {
 }