Use the Cookie Storage from the Private Browsing Storage Session directly
authorjberlin@webkit.org <jberlin@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 9 Mar 2011 16:41:43 +0000 (16:41 +0000)
committerjberlin@webkit.org <jberlin@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 9 Mar 2011 16:41:43 +0000 (16:41 +0000)
https://bugs.webkit.org/show_bug.cgi?id=55986

Reviewed by Adam Roben.

Source/WebCore:

* WebCore.exp.in:
* platform/mac/WebCoreSystemInterface.h:
* platform/mac/WebCoreSystemInterface.mm:

* platform/network/mac/CookieStorageMac.mm:
(WebCore::setCookieStoragePrivateBrowsingEnabled):
Just copy the cookie storage from the private browsing storage session.
* platform/network/cf/CookieStorageCFNet.cpp:
(WebCore::setCookieStoragePrivateBrowsingEnabled):
Ditto.

Source/WebKit/mac:

* WebCoreSupport/WebSystemInterface.mm:
(InitWebCoreSystemInterface):

Source/WebKit2:

* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface):

WebKitLibraries:

* WebKitSystemInterface.h:
* libWebKitSystemInterfaceLeopard.a:
* libWebKitSystemInterfaceSnowLeopard.a:
* win/include/WebKitSystemInterface/WebKitSystemInterface.h:
* win/lib/WebKitSystemInterface.lib:

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

16 files changed:
Source/WebCore/ChangeLog
Source/WebCore/WebCore.exp.in
Source/WebCore/platform/mac/WebCoreSystemInterface.h
Source/WebCore/platform/mac/WebCoreSystemInterface.mm
Source/WebCore/platform/network/cf/CookieStorageCFNet.cpp
Source/WebCore/platform/network/mac/CookieStorageMac.mm
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm
WebKitLibraries/ChangeLog
WebKitLibraries/WebKitSystemInterface.h
WebKitLibraries/libWebKitSystemInterfaceLeopard.a
WebKitLibraries/libWebKitSystemInterfaceSnowLeopard.a
WebKitLibraries/win/include/WebKitSystemInterface/WebKitSystemInterface.h
WebKitLibraries/win/lib/WebKitSystemInterface.lib

index 443807ea4d7563da5da8aaf7b521fea58d61017d..af33c697e809e8ee80f7132402d27328c70de22a 100644 (file)
@@ -1,3 +1,21 @@
+2011-03-09  Jessie Berlin  <jberlin@apple.com>
+
+        Reviewed by Adam Roben.
+
+        Use the Cookie Storage from the Private Browsing Storage Session directly
+        https://bugs.webkit.org/show_bug.cgi?id=55986
+
+        * WebCore.exp.in:
+        * platform/mac/WebCoreSystemInterface.h:
+        * platform/mac/WebCoreSystemInterface.mm:
+
+        * platform/network/mac/CookieStorageMac.mm:
+        (WebCore::setCookieStoragePrivateBrowsingEnabled):
+        Just copy the cookie storage from the private browsing storage session.
+        * platform/network/cf/CookieStorageCFNet.cpp:
+        (WebCore::setCookieStoragePrivateBrowsingEnabled):
+        Ditto.
+
 2011-03-09  Andrey Kosyakov  <caseq@chromium.org>
 
         Unreviewed. Fixed a crash in InspectorInstrumentation::didReceiveResponse() when loader is null (broken in r80639)
index 26dde2d23d29b9372204b0d409a36fdf3936f107..5fc6a2d0a9eda32c9b3d1f67b01e45482d048d9b 100644 (file)
@@ -1340,7 +1340,7 @@ _wkSignalCFReadStreamError
 _wkSignalCFReadStreamHasBytes
 _wkCreatePrivateStorageSession
 _wkCopyRequestWithStorageSession
-_wkCreatePrivateInMemoryHTTPCookieStorage
+_wkCopyHTTPCookieStorage
 _wkGetHTTPCookieAcceptPolicy
 _wkHTTPCookiesForURL
 _wkSetHTTPCookiesForURL
index df65ff2d7a07ac5376a27a086ee9356ef0e9c14c..ae3ca65bb67200453323c66b9664aefbc631b824 100644 (file)
@@ -244,7 +244,7 @@ extern CFURLStorageSessionRef (*wkCreatePrivateStorageSession)(CFStringRef);
 extern NSURLRequest* (*wkCopyRequestWithStorageSession)(CFURLStorageSessionRef, NSURLRequest*);
 
 typedef struct OpaqueCFHTTPCookieStorage* CFHTTPCookieStorageRef;
-extern CFHTTPCookieStorageRef (*wkCreatePrivateInMemoryHTTPCookieStorage)(CFURLStorageSessionRef);
+extern CFHTTPCookieStorageRef (*wkCopyHTTPCookieStorage)(CFURLStorageSessionRef);
 extern unsigned (*wkGetHTTPCookieAcceptPolicy)(CFHTTPCookieStorageRef);
 extern NSArray *(*wkHTTPCookiesForURL)(CFHTTPCookieStorageRef, NSURL *);
 extern void (*wkSetHTTPCookiesForURL)(CFHTTPCookieStorageRef, NSArray *, NSURL *, NSURL *);
index 50ac23638d05b6ff97ce1072504832538ecbcea4..375ee5a80b2cc8ccfa0c47c3ba708b7b872dc986 100644 (file)
@@ -174,7 +174,7 @@ AXUIElementRef (*wkCreateAXUIElementRef)(id element);
 
 CFURLStorageSessionRef (*wkCreatePrivateStorageSession)(CFStringRef);
 NSURLRequest* (*wkCopyRequestWithStorageSession)(CFURLStorageSessionRef, NSURLRequest*);
-CFHTTPCookieStorageRef (*wkCreatePrivateInMemoryHTTPCookieStorage)(CFURLStorageSessionRef);
+CFHTTPCookieStorageRef (*wkCopyHTTPCookieStorage)(CFURLStorageSessionRef);
 unsigned (*wkGetHTTPCookieAcceptPolicy)(CFHTTPCookieStorageRef);
 NSArray *(*wkHTTPCookiesForURL)(CFHTTPCookieStorageRef, NSURL *);
 void (*wkSetHTTPCookiesForURL)(CFHTTPCookieStorageRef, NSArray *, NSURL *, NSURL *);
index c2a5691dfb123e85dd16b8d6d3b4a17d4b0d04d9..e955081a937c4101f4205da6de9f6644c515edb7 100644 (file)
@@ -74,10 +74,11 @@ void setCookieStoragePrivateBrowsingEnabled(bool enabled)
     }
 
 #if USE(CFURLSTORAGESESSIONS)
-    privateBrowsingCookieStorage().adoptCF(wkCreatePrivateInMemoryHTTPCookieStorage(ResourceHandle::privateBrowsingStorageSession()));
-#else
-    privateBrowsingCookieStorage().adoptCF(wkCreatePrivateInMemoryHTTPCookieStorage(0));
+    if (CFURLStorageSessionRef privateStorageSession = ResourceHandle::privateBrowsingStorageSession())
+        privateBrowsingCookieStorage().adoptCF(wkCopyHTTPCookieStorage(privateStorageSession));
+    else
 #endif
+        privateBrowsingCookieStorage().adoptCF(wkCreateInMemoryHTTPCookieStorage());
 }
 
 static void notifyCookiesChangedOnMainThread(void* context)
index db64aaea0c5f90377920e93ff067848e6bf4aad3..bc17a986cdbbe4208c119d047bf376474517f430 100644 (file)
@@ -92,7 +92,7 @@ void setCookieStoragePrivateBrowsingEnabled(bool enabled)
         return;
 
     if (enabled && ResourceHandle::privateBrowsingStorageSession()) {
-        privateBrowsingCookieStorage().adoptCF(wkCreatePrivateInMemoryHTTPCookieStorage(ResourceHandle::privateBrowsingStorageSession()));
+        privateBrowsingCookieStorage().adoptCF(wkCopyHTTPCookieStorage(ResourceHandle::privateBrowsingStorageSession()));
 
         // FIXME: When Private Browsing is enabled, the Private Browsing Cookie Storage should be
         // observed for changes, not the default Cookie Storage.
index aa7b5036d7daab82ea9b1d1d00895155a32a8837..7c0d85855b141b855b4dc7ada318ca398aaf3441 100644 (file)
@@ -1,3 +1,13 @@
+2011-03-09  Jessie Berlin  <jberlin@apple.com>
+
+        Reviewed by Adam Roben.
+
+        Use the Cookie Storage from the Private Browsing Storage Session directly
+        https://bugs.webkit.org/show_bug.cgi?id=55986
+
+        * WebCoreSupport/WebSystemInterface.mm:
+        (InitWebCoreSystemInterface):
+
 2011-03-08  Darin Adler  <darin@apple.com>
 
         Reviewed by Timothy Hatcher.
index 6504f17afef95122bb3c9e5a6f4c362f8df88f21..bbfc416695370a8b545b971913c76cb14cbce8f6 100644 (file)
@@ -168,7 +168,7 @@ void InitWebCoreSystemInterface(void)
     INIT(UnregisterUniqueIdForElement);
     INIT(CreatePrivateStorageSession);
     INIT(CopyRequestWithStorageSession);
-    INIT(CreatePrivateInMemoryHTTPCookieStorage);
+    INIT(CopyHTTPCookieStorage);
     INIT(GetHTTPCookieAcceptPolicy);
     INIT(HTTPCookiesForURL);
     INIT(SetHTTPCookiesForURL);
index 102acb1e782bd4ea6ca39a6f86712108ff95cf2e..97b42767608cdc9a13940c9e3fddae556b5d4887 100644 (file)
@@ -1,3 +1,13 @@
+2011-03-09  Jessie Berlin  <jberlin@apple.com>
+
+        Reviewed by Adam Roben.
+
+        Use the Cookie Storage from the Private Browsing Storage Session directly
+        https://bugs.webkit.org/show_bug.cgi?id=55986
+
+        * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
+        (InitWebCoreSystemInterface):
+
 2011-03-09  Alejandro G. Castro  <alex@igalia.com>
 
         Fix compilation after r80596, add soup Download stubs.
index 2c8649ebc6144d5272db12e81e87b81a1d026e96..3c817e746fb3771279c0feec02474dc5f5f22a0e 100644 (file)
@@ -95,7 +95,7 @@ void InitWebCoreSystemInterface(void)
         INIT(SignalCFReadStreamHasBytes);
         INIT(CreatePrivateStorageSession);
         INIT(CopyRequestWithStorageSession);
-        INIT(CreatePrivateInMemoryHTTPCookieStorage);
+        INIT(CopyHTTPCookieStorage);
         INIT(GetHTTPCookieAcceptPolicy);
         INIT(HTTPCookiesForURL);
         INIT(SetHTTPCookiesForURL);
index 9a9517b7224c496c6f16220a0abfae326cddd0b5..40865cb803860bfbe511f5d1ec1f33659a64e385 100644 (file)
@@ -1,3 +1,16 @@
+2011-03-09  Jessie Berlin  <jberlin@apple.com>
+
+        Reviewed by Adam Roben.
+
+        Use the Cookie Storage from the Private Browsing Storage Session directly
+        https://bugs.webkit.org/show_bug.cgi?id=55986
+
+        * WebKitSystemInterface.h:
+        * libWebKitSystemInterfaceLeopard.a:
+        * libWebKitSystemInterfaceSnowLeopard.a:
+        * win/include/WebKitSystemInterface/WebKitSystemInterface.h:
+        * win/lib/WebKitSystemInterface.lib:
+
 2011-03-07  Steve Falkenburg  <sfalken@apple.com>
 
         Bump version.
index 4d6703ca39aa2365c8e56bcd92663450b04fd4f2..3813cbb752ed4d6960950de96e19784719f50cba 100644 (file)
@@ -239,7 +239,7 @@ NSURLRequest *WKCopyRequestWithStorageSession(CFURLStorageSessionRef, NSURLReque
 NSCachedURLResponse *WKCachedResponseForRequest(CFURLStorageSessionRef, NSURLRequest*);
 
 typedef struct OpaqueCFHTTPCookieStorage* CFHTTPCookieStorageRef;
-CFHTTPCookieStorageRef WKCreatePrivateInMemoryHTTPCookieStorage(CFURLStorageSessionRef);
+CFHTTPCookieStorageRef WKCopyHTTPCookieStorage(CFURLStorageSessionRef);
 unsigned WKGetHTTPCookieAcceptPolicy(CFHTTPCookieStorageRef);
 NSArray *WKHTTPCookiesForURL(CFHTTPCookieStorageRef, NSURL *);
 void WKSetHTTPCookiesForURL(CFHTTPCookieStorageRef, NSArray *, NSURL *, NSURL *);
index d52ce7f8ea42f792762280199b1de97cfd3feb31..dbb46585be447199f394551c09162edaf8ef9ae4 100644 (file)
Binary files a/WebKitLibraries/libWebKitSystemInterfaceLeopard.a and b/WebKitLibraries/libWebKitSystemInterfaceLeopard.a differ
index e54b84403318d7f7dafb6d130514b92e19ad6d71..dee1994f0d9eb31f39dff5d3de6bbda5c60f44ff 100644 (file)
Binary files a/WebKitLibraries/libWebKitSystemInterfaceSnowLeopard.a and b/WebKitLibraries/libWebKitSystemInterfaceSnowLeopard.a differ
index 5d17561da017b8d1538cc39e3191c344059cccd2..80f97c34d7e94e6f4ac4d226d6861b23dea94fa9 100644 (file)
@@ -89,7 +89,7 @@ CFDictionaryRef wkGetSSLCertificateInfo(CFURLResponseRef);
 void* wkGetSSLPeerCertificateData(CFDictionaryRef);
 void* wkGetSSLCertificateChainContext(CFDictionaryRef);
 CFHTTPCookieStorageRef wkGetDefaultHTTPCookieStorage();
-CFHTTPCookieStorageRef wkCreatePrivateInMemoryHTTPCookieStorage(CFURLStorageSessionRef);
+CFHTTPCookieStorageRef wkCreateInMemoryHTTPCookieStorage();
 void wkSetCFURLRequestShouldContentSniff(CFMutableURLRequestRef, bool);
 CFStringRef wkCopyFoundationCacheDirectory();
 void wkSetClientCertificateInSSLProperties(CFMutableDictionaryRef, CFDataRef);
@@ -100,6 +100,7 @@ void wkCFURLRequestSetHTTPRequestBodyParts(CFMutableURLRequestRef, CFArrayRef bo
 CFURLStorageSessionRef wkCreatePrivateStorageSession(CFStringRef identifier);
 void wkSetRequestStorageSession(CFURLStorageSessionRef, CFMutableURLRequestRef);
 CFURLCacheRef wkCopyURLCache(CFURLStorageSessionRef);
+CFHTTPCookieStorageRef wkCopyHTTPCookieStorage(CFURLStorageSessionRef);
 
 CFArrayRef wkCFURLCacheCopyAllHostNamesInPersistentStore();
 void wkCFURLCacheDeleteHostNamesInPersistentStore(CFArrayRef hostNames);
index c6fe998669f57cebac080a78360030c624281f8a..532555df45da2f4a237572c0cb1ed70d1a744fa5 100644 (file)
Binary files a/WebKitLibraries/win/lib/WebKitSystemInterface.lib and b/WebKitLibraries/win/lib/WebKitSystemInterface.lib differ