Source/JavaScriptCore: WebKit2: Use CFNetwork Sessions API.
authorjberlin@webkit.org <jberlin@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 3 Mar 2011 00:07:15 +0000 (00:07 +0000)
committerjberlin@webkit.org <jberlin@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 3 Mar 2011 00:07:15 +0000 (00:07 +0000)
https://bugs.webkit.org/show_bug.cgi?id=55435

Reviewed by Adam Roben.

Add the ability to create a Private Browsing storage session.

* wtf/Platform.h:
Add a new #define for using CF Storage Sessions.

Source/WebCore: WebKit2: Use CFNetwork Sessions API.
https://bugs.webkit.org/show_bug.cgi?id=55435

Reviewed by Adam Roben.

Add the ability to create a Private Browsing Storage Session.

* WebCore.exp.in:
Export the symbol for ResourceHandle::setPrivateBrowsingStorageSessionIdentifierBase.

* page/Settings.cpp:
(WebCore::Settings::setPrivateBrowsingEnabled):
Propagate the private browsing state to the ResourceHandle.

* platform/mac/WebCoreSystemInterface.h:
Add the function declaration for wkCreatePrivateStorageSession.
* platform/mac/WebCoreSystemInterface.mm:

* platform/network/ResourceHandle.cpp:
(WebCore::privateStorageSession):
Since the same Private Browsing Storage Session will need to be accessed throughout the loading
code and will need to be used by all web pages and page groups, make it a global static.
(WebCore::privateBrowsingStorageSessionIdentifierBase):
Ditto, since the identifier is needed to create the Private Browsing Storage Session.
(WebCore::ResourceHandle::setPrivateBrowsingEnabled):
If enabled, create and store the Private Browsing Storage Session.
(WebCore::ResourceHandle::privateBrowsingStorageSession):
(WebCore::ResourceHandle::setPrivateBrowsingStorageSessionIdentifierBase):
* platform/network/ResourceHandle.h:

* platform/network/cf/ResourceHandleCFNet.cpp:
(WebCore::ResourceHandle::createPrivateBrowsingStorageSession):
The call to wkCreatePrivateStorageSession needs to be in a file including the correct
version of WKSI.
(WebCore::ResourceHandle::privateBrowsingStorageSessionIdentifierDefaultBase):
Return the bundle identifier.
* platform/network/mac/ResourceHandleMac.mm:
(WebCore::ResourceHandle::createPrivateBrowsingStorageSession):
The call to wkCreatePrivateStorageSession needs to be in a file importing the correct
version of WKSI.
(WebCore::ResourceHandle::privateBrowsingStorageSessionIdentifierDefaultBase):
Return the bundle identifier.

Source/WebKit/mac: WebKit2: Use CFNetwork Sessions API.
https://bugs.webkit.org/show_bug.cgi?id=55435.

Reviewed by Adam Roben.

Add the ability to create a Private Browsing Storage Session.

* WebCoreSupport/WebSystemInterface.mm:
(InitWebCoreSystemInterface):
Support calling wkCreatePrivateStorageSession from WebCore.

Source/WebKit2: WebKit2: Use CFNetwork Sessions API.
https://bugs.webkit.org/show_bug.cgi?id=55435

Reviewed by Adam Roben.

Add the ability to create a Private Browsing Storage Session.

* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode):
Encode the UI Process bundle identifier.
(WebKit::WebProcessCreationParameters::decode):
Decode the UI Process bundle identifier.
* Shared/WebProcessCreationParameters.h:

* UIProcess/mac/WebContextMac.mm:
(WebKit::WebContext::platformInitializeWebProcess):
Grab the bundle identifier and use it to set the WebProcessCreationParameter.
* UIProcess/win/WebContextWin.cpp:
(WebKit::WebContext::platformInitializeWebProcess):
Ditto.

* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface):
Support using the wkCreatePrivateStorageSession WKSI in WebCore.

* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess):
Set the base for the Private Browsing Storage Session identifier to be the bundle identifier
from the UI Process so that WebKit1 would create a Private Browsing Storage Session with the
same identifier as WebKit2.

WebKitLibraries: WebKit2: Use CFNetwork Sessions API.
https://bugs.webkit.org/show_bug.cgi?id=55435

Rubber-stamped by Adam Roben.

Add the ability to create a Private Browsing Storage Session.

Update WebKitSystemInterface headers and libraries with the new functions.

* 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@80180 268f45cc-cd09-0410-ab3c-d52691b4dbfc

26 files changed:
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/wtf/Platform.h
Source/WebCore/ChangeLog
Source/WebCore/WebCore.exp.in
Source/WebCore/page/Settings.cpp
Source/WebCore/platform/mac/WebCoreSystemInterface.h
Source/WebCore/platform/mac/WebCoreSystemInterface.mm
Source/WebCore/platform/network/ResourceHandle.cpp
Source/WebCore/platform/network/ResourceHandle.h
Source/WebCore/platform/network/cf/ResourceHandleCFNet.cpp
Source/WebCore/platform/network/mac/ResourceHandleMac.mm
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/WebProcessCreationParameters.cpp
Source/WebKit2/Shared/WebProcessCreationParameters.h
Source/WebKit2/UIProcess/mac/WebContextMac.mm
Source/WebKit2/UIProcess/win/WebContextWin.cpp
Source/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm
Source/WebKit2/WebProcess/WebProcess.cpp
WebKitLibraries/ChangeLog
WebKitLibraries/WebKitSystemInterface.h
WebKitLibraries/libWebKitSystemInterfaceLeopard.a
WebKitLibraries/libWebKitSystemInterfaceSnowLeopard.a
WebKitLibraries/win/include/WebKitSystemInterface/WebKitSystemInterface.h
WebKitLibraries/win/lib/WebKitSystemInterface.lib

index 5a2d2b7..0e4018a 100644 (file)
@@ -1,3 +1,15 @@
+2011-03-02  Jessie Berlin  <jberlin@apple.com>
+
+        Reviewed by Adam Roben.
+
+        WebKit2: Use CFNetwork Sessions API.
+        https://bugs.webkit.org/show_bug.cgi?id=55435
+
+        Add the ability to create a Private Browsing storage session.
+
+        * wtf/Platform.h:
+        Add a new #define for using CF Storage Sessions.
+
 2011-03-02  Oliver Hunt  <oliver@apple.com>
 
         Reviewed by Gavin Barraclough.
index 95689ab..95f6cf5 100644 (file)
 
 #if USE(CFNETWORK) || PLATFORM(MAC)
 #define WTF_USE_CFURLCACHE 1
+#define WTF_USE_CFURLSTORAGESESSIONS 1
 #endif
 
 #if PLATFORM(WIN) && !OS(WINCE) && !PLATFORM(CHROMIUM) && !PLATFORM(QT)
index e60a1d9..d11868e 100644 (file)
@@ -1,3 +1,48 @@
+2011-03-02  Jessie Berlin  <jberlin@apple.com>
+
+        Reviewed by Adam Roben.
+
+        WebKit2: Use CFNetwork Sessions API.
+        https://bugs.webkit.org/show_bug.cgi?id=55435
+
+        Add the ability to create a Private Browsing Storage Session.
+
+        * WebCore.exp.in:
+        Export the symbol for ResourceHandle::setPrivateBrowsingStorageSessionIdentifierBase.
+
+        * page/Settings.cpp:
+        (WebCore::Settings::setPrivateBrowsingEnabled):
+        Propagate the private browsing state to the ResourceHandle.
+
+        * platform/mac/WebCoreSystemInterface.h:
+        Add the function declaration for wkCreatePrivateStorageSession.
+        * platform/mac/WebCoreSystemInterface.mm:
+
+        * platform/network/ResourceHandle.cpp:
+        (WebCore::privateStorageSession):
+        Since the same Private Browsing Storage Session will need to be accessed throughout the loading
+        code and will need to be used by all web pages and page groups, make it a global static.
+        (WebCore::privateBrowsingStorageSessionIdentifierBase):
+        Ditto, since the identifier is needed to create the Private Browsing Storage Session.
+        (WebCore::ResourceHandle::setPrivateBrowsingEnabled):
+        If enabled, create and store the Private Browsing Storage Session.
+        (WebCore::ResourceHandle::privateBrowsingStorageSession):
+        (WebCore::ResourceHandle::setPrivateBrowsingStorageSessionIdentifierBase):
+        * platform/network/ResourceHandle.h:
+
+        * platform/network/cf/ResourceHandleCFNet.cpp:
+        (WebCore::ResourceHandle::createPrivateBrowsingStorageSession):
+        The call to wkCreatePrivateStorageSession needs to be in a file including the correct
+        version of WKSI.
+        (WebCore::ResourceHandle::privateBrowsingStorageSessionIdentifierDefaultBase):
+        Return the bundle identifier.
+        * platform/network/mac/ResourceHandleMac.mm:
+        (WebCore::ResourceHandle::createPrivateBrowsingStorageSession):
+        The call to wkCreatePrivateStorageSession needs to be in a file importing the correct
+        version of WKSI.
+        (WebCore::ResourceHandle::privateBrowsingStorageSessionIdentifierDefaultBase):
+        Return the bundle identifier.
+
 2011-03-02  Daniel Cheng  <dcheng@chromium.org>
 
         Revert frame-specific WebClipboard changes
index 4f7c0fe..40f16ce 100644 (file)
@@ -1333,6 +1333,7 @@ _wkSetUpFontCache
 _wkSignalCFReadStreamEnd
 _wkSignalCFReadStreamError
 _wkSignalCFReadStreamHasBytes
+_wkCreatePrivateStorageSession
 
 #if !defined(NDEBUG)
 __ZN7WebCore20LogNotYetImplementedE
@@ -1781,3 +1782,7 @@ __ZN7WebCore6Editor14capitalizeWordEv
 #if ENABLE(GESTURE_EVENTS)
 __ZN7WebCore12EventHandler18handleGestureEventERKNS_20PlatformGestureEventE
 #endif
+
+#if USE(CFURLSTORAGESESSIONS)
+__ZN7WebCore14ResourceHandle46setPrivateBrowsingStorageSessionIdentifierBaseERKN3WTF6StringE
+#endif
index c6ca249..fe8f8ae 100644 (file)
@@ -37,6 +37,7 @@
 #include "HistoryItem.h"
 #include "Page.h"
 #include "PageCache.h"
+#include "ResourceHandle.h"
 #include "StorageMap.h"
 #include <limits>
 
@@ -337,6 +338,10 @@ void Settings::setPrivateBrowsingEnabled(bool privateBrowsingEnabled)
     if (m_privateBrowsingEnabled == privateBrowsingEnabled)
         return;
 
+#if USE(CFURLSTORAGESESSIONS)
+    ResourceHandle::setPrivateBrowsingEnabled(privateBrowsingEnabled);
+#endif
+
     // FIXME: We can only enable cookie private browsing mode globally, so it's misleading to have it as a per-page setting.
     setCookieStoragePrivateBrowsingEnabled(privateBrowsingEnabled);
 
index e6d6cf6..e51e15d 100644 (file)
@@ -235,6 +235,9 @@ extern CFTypeRef (*wkCreateAXTextMarker)(const void *bytes, size_t len);
 extern BOOL (*wkGetBytesFromAXTextMarker)(CFTypeRef textMarker, void *bytes, size_t length);
 extern AXUIElementRef (*wkCreateAXUIElementRef)(id element);
 
+typedef const struct __CFURLStorageSession* CFURLStorageSessionRef;
+extern CFURLStorageSessionRef (*wkCreatePrivateStorageSession)(CFStringRef);
+
 }
 
 #endif
index 24bdcb1..ce8fa5e 100644 (file)
@@ -172,3 +172,5 @@ CFTypeRef (*wkCreateAXTextMarker)(const void *bytes, size_t len);
 BOOL (*wkGetBytesFromAXTextMarker)(CFTypeRef textMarker, void *bytes, size_t length);
 AXUIElementRef (*wkCreateAXUIElementRef)(id element);
 
+CFURLStorageSessionRef (*wkCreatePrivateStorageSession)(CFStringRef);
+
index 9910ac1..d901984 100644 (file)
@@ -33,6 +33,7 @@
 #include "ResourceHandleClient.h"
 #include "Timer.h"
 #include <algorithm>
+#include <wtf/text/CString.h>
 
 namespace WebCore {
 
@@ -185,4 +186,46 @@ void ResourceHandle::cacheMetadata(const ResourceResponse&, const Vector<char>&)
     // Optionally implemented by platform.
 }
 
+#if USE(CFURLSTORAGESESSIONS)
+
+static RetainPtr<CFURLStorageSessionRef>& privateStorageSession()
+{
+    DEFINE_STATIC_LOCAL(RetainPtr<CFURLStorageSessionRef>, storageSession, ());
+    return storageSession;
+}
+
+static String& privateBrowsingStorageSessionIdentifierBase()
+{
+    DEFINE_STATIC_LOCAL(String, base, ());
+    return base;
+}
+
+void ResourceHandle::setPrivateBrowsingEnabled(bool enabled)
+{
+    if (!enabled) {
+        privateStorageSession() = nullptr;
+        return;
+    }
+
+    if (privateStorageSession())
+        return;
+
+    String base = privateBrowsingStorageSessionIdentifierBase().isNull() ? privateBrowsingStorageSessionIdentifierDefaultBase() : privateBrowsingStorageSessionIdentifierBase();
+    RetainPtr<CFStringRef> cfIdentifier(AdoptCF, String::format("%s.PrivateBrowsing", base.utf8().data()).createCFString());
+
+    privateStorageSession() = createPrivateBrowsingStorageSession(cfIdentifier.get());
+}
+
+CFURLStorageSessionRef ResourceHandle::privateBrowsingStorageSession()
+{
+    return privateStorageSession().get();
+}
+
+void ResourceHandle::setPrivateBrowsingStorageSessionIdentifierBase(const String& identifier)
+{
+    privateBrowsingStorageSessionIdentifierBase() = identifier;
+}
+
+#endif // USE(CFURLSTORAGESESSIONS)
+
 } // namespace WebCore
index 9ad7652..d82a9e4 100644 (file)
@@ -71,6 +71,10 @@ typedef int CFHTTPCookieStorageAcceptPolicy;
 typedef struct OpaqueCFHTTPCookieStorage* CFHTTPCookieStorageRef;
 #endif
 
+#if USE(CFURLSTORAGESESSIONS)
+typedef const struct __CFURLStorageSession* CFURLStorageSessionRef;
+#endif
+
 namespace WebCore {
 
 class AuthenticationChallenge;
@@ -186,6 +190,12 @@ public:
 
     void fireFailure(Timer<ResourceHandle>*);
 
+#if USE(CFURLSTORAGESESSIONS)
+    static void setPrivateBrowsingEnabled(bool);
+    static CFURLStorageSessionRef privateBrowsingStorageSession();
+    static void setPrivateBrowsingStorageSessionIdentifierBase(const String&);
+#endif
+
     using RefCounted<ResourceHandle>::ref;
     using RefCounted<ResourceHandle>::deref;
 
@@ -214,6 +224,11 @@ private:
     void createCFURLConnection(bool shouldUseCredentialStorage, bool shouldContentSniff);
 #endif
 
+#if USE(CFURLSTORAGESESSIONS)
+    static RetainPtr<CFURLStorageSessionRef> createPrivateBrowsingStorageSession(CFStringRef identifier);
+    static String privateBrowsingStorageSessionIdentifierDefaultBase();
+#endif
+
     friend class ResourceHandleInternal;
     OwnPtr<ResourceHandleInternal> d;
 };
index 52b100f..7619013 100644 (file)
@@ -716,6 +716,16 @@ bool ResourceHandle::willLoadFromCache(ResourceRequest& request, Frame* frame)
     return cached;
 }
 
+RetainPtr<CFURLStorageSessionRef> ResourceHandle::createPrivateBrowsingStorageSession(CFStringRef identifier)
+{
+    return RetainPtr<CFURLStorageSessionRef>(AdoptCF, wkCreatePrivateStorageSession(identifier));
+}
+
+String ResourceHandle::privateBrowsingStorageSessionIdentifierDefaultBase()
+{
+    return String(reinterpret_cast<CFStringRef>(CFBundleGetValueForInfoDictionaryKey(CFBundleGetMainBundle(), kCFBundleIdentifierKey)));
+}
+
 void WebCoreSynchronousLoaderClient::willSendRequest(ResourceHandle* handle, ResourceRequest& request, const ResourceResponse& /*redirectResponse*/)
 {
     // FIXME: This needs to be fixed to follow the redirect correctly even for cross-domain requests.
index 2d687c0..42d36af 100644 (file)
@@ -693,6 +693,16 @@ void ResourceHandle::receivedCancellation(const AuthenticationChallenge& challen
         client()->receivedCancellation(this, challenge);
 }
 
+RetainPtr<CFURLStorageSessionRef> ResourceHandle::createPrivateBrowsingStorageSession(CFStringRef identifier)
+{
+    return RetainPtr<CFURLStorageSessionRef>(AdoptCF, wkCreatePrivateStorageSession(identifier));
+}
+
+String ResourceHandle::privateBrowsingStorageSessionIdentifierDefaultBase()
+{
+    return String([[NSBundle mainBundle] bundleIdentifier]);
+}
+
 } // namespace WebCore
 
 @implementation WebCoreResourceHandleAsDelegate
index 885f723..ea7267e 100644 (file)
@@ -1,3 +1,16 @@
+2011-03-02  Jessie Berlin  <jberlin@apple.com>
+
+        Reviewed by Adam Roben.
+
+        WebKit2: Use CFNetwork Sessions API.
+        https://bugs.webkit.org/show_bug.cgi?id=55435.
+
+        Add the ability to create a Private Browsing Storage Session.
+
+        * WebCoreSupport/WebSystemInterface.mm:
+        (InitWebCoreSystemInterface):
+        Support calling wkCreatePrivateStorageSession from WebCore.
+
 2011-03-02  Daniel Cheng  <dcheng@chromium.org>
 
         Reviewed by David Levin.
index c39576b..c8de7cf 100644 (file)
@@ -154,6 +154,7 @@ void InitWebCoreSystemInterface(void)
     INIT(ContentAreaDidShow);
     INIT(ContentAreaDidHide);
     INIT(ScrollbarPainterUsesOverlayScrollers);
+    INIT(CreatePrivateStorageSession);
 #endif
 
     INIT(GetAXTextMarkerTypeID);
index 2eb8de2..a875c4a 100644 (file)
@@ -1,3 +1,36 @@
+2011-03-02  Jessie Berlin  <jberlin@apple.com>
+
+        Reviewed by Adam Roben.
+
+        WebKit2: Use CFNetwork Sessions API.
+        https://bugs.webkit.org/show_bug.cgi?id=55435
+
+        Add the ability to create a Private Browsing Storage Session.
+
+        * Shared/WebProcessCreationParameters.cpp:
+        (WebKit::WebProcessCreationParameters::encode):
+        Encode the UI Process bundle identifier.
+        (WebKit::WebProcessCreationParameters::decode):
+        Decode the UI Process bundle identifier.
+        * Shared/WebProcessCreationParameters.h:
+
+        * UIProcess/mac/WebContextMac.mm:
+        (WebKit::WebContext::platformInitializeWebProcess):
+        Grab the bundle identifier and use it to set the WebProcessCreationParameter.
+        * UIProcess/win/WebContextWin.cpp:
+        (WebKit::WebContext::platformInitializeWebProcess):
+        Ditto.
+
+        * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
+        (InitWebCoreSystemInterface):
+        Support using the wkCreatePrivateStorageSession WKSI in WebCore.
+
+        * WebProcess/WebProcess.cpp:
+        (WebKit::WebProcess::initializeWebProcess):
+        Set the base for the Private Browsing Storage Session identifier to be the bundle identifier
+        from the UI Process so that WebKit1 would create a Private Browsing Storage Session with the
+        same identifier as WebKit2.
+
 2011-03-01  Brian Weinstein  <bweinstein@apple.com>
 
         Reviewed by Adam Roben.
index d4121f7..09b005c 100644 (file)
@@ -59,6 +59,9 @@ void WebProcessCreationParameters::encode(CoreIPC::ArgumentEncoder* encoder) con
     encoder->encode(languageCode);
     encoder->encode(textCheckerState);
     encoder->encode(defaultRequestTimeoutInterval);
+#if USE(CFURLSTORAGESESSIONS)
+    encoder->encode(uiProcessBundleIdentifier);
+#endif
 #if PLATFORM(MAC)
     encoder->encode(parentProcessName);
     encoder->encode(presenterApplicationPid);
@@ -105,6 +108,10 @@ bool WebProcessCreationParameters::decode(CoreIPC::ArgumentDecoder* decoder, Web
         return false;
     if (!decoder->decode(parameters.defaultRequestTimeoutInterval))
         return false;
+#if USE(CFURLSTORAGESESSIONS)
+    if (!decoder->decode(parameters.uiProcessBundleIdentifier))
+        return false;
+#endif
 
 #if PLATFORM(MAC)
     if (!decoder->decode(parameters.parentProcessName))
index 41b3e2c..a57be99 100644 (file)
@@ -75,6 +75,10 @@ struct WebProcessCreationParameters {
 
     double defaultRequestTimeoutInterval;
 
+#if USE(CFURLSTORAGESESSIONS)
+    String uiProcessBundleIdentifier;
+#endif
+
 #if PLATFORM(MAC)
     String parentProcessName;
 
index f91eb1c..292d0fa 100644 (file)
@@ -93,6 +93,8 @@ void WebContext::platformInitializeWebProcess(WebProcessCreationParameters& para
 
     // FIXME: This should really be configurable; we shouldn't just blindly allow read access to the UI process bundle.
     parameters.uiProcessBundleResourcePath = fileSystemRepresentation([[NSBundle mainBundle] resourcePath]);
+
+    parameters.uiProcessBundleIdentifier = String([[NSBundle mainBundle] bundleIdentifier]);
 }
 
 String WebContext::platformDefaultDatabaseDirectory() const
index 04b294e..a0fdc06 100644 (file)
@@ -68,6 +68,8 @@ void WebContext::platformInitializeWebProcess(WebProcessCreationParameters& para
     ASSERT(parameters.cfURLCachePath.length());
     if (parameters.cfURLCachePath[parameters.cfURLCachePath.length() - 1] == '/')
         parameters.cfURLCachePath.remove(parameters.cfURLCachePath.length() - 1);
+
+    parameters.uiProcessBundleIdentifier = String(reinterpret_cast<CFStringRef>(CFBundleGetValueForInfoDictionaryKey(CFBundleGetMainBundle(), kCFBundleIdentifierKey)));
 #endif
 }
 
index 2d74bbc..3483b68 100644 (file)
@@ -93,6 +93,7 @@ void InitWebCoreSystemInterface(void)
         INIT(SignalCFReadStreamEnd);
         INIT(SignalCFReadStreamError);
         INIT(SignalCFReadStreamHasBytes);
+        INIT(CreatePrivateStorageSession);
 
 #if !defined(BUILDING_ON_SNOW_LEOPARD)
         INIT(IOSurfaceContextCreate);
index cfd22bf..4cfa8b4 100644 (file)
@@ -58,6 +58,7 @@
 #include <WebCore/MemoryCache.h>
 #include <WebCore/Page.h>
 #include <WebCore/PageGroup.h>
+#include <WebCore/ResourceHandle.h>
 #include <WebCore/SchemeRegistry.h>
 #include <WebCore/SecurityOrigin.h>
 #include <WebCore/Settings.h>
@@ -212,6 +213,10 @@ void WebProcess::initializeWebProcess(const WebProcessCreationParameters& parame
 
     if (parameters.shouldAlwaysUseComplexTextCodePath)
         setAlwaysUsesComplexTextCodePath(true);
+
+#if USE(CFURLSTORAGESESSIONS)
+    WebCore::ResourceHandle::setPrivateBrowsingStorageSessionIdentifierBase(parameters.uiProcessBundleIdentifier);
+#endif
 }
 
 void WebProcess::setShouldTrackVisitedLinks(bool shouldTrackVisitedLinks)
index b7b1105..01dfd08 100644 (file)
@@ -1,3 +1,20 @@
+2011-03-02  Jessie Berlin  <jberlin@apple.com>
+
+        Rubber-stamped by Adam Roben.
+
+        WebKit2: Use CFNetwork Sessions API.
+        https://bugs.webkit.org/show_bug.cgi?id=55435
+
+        Add the ability to create a Private Browsing Storage Session.
+
+        Update WebKitSystemInterface headers and libraries with the new functions.
+
+        * WebKitSystemInterface.h:
+        * libWebKitSystemInterfaceLeopard.a:
+        * libWebKitSystemInterfaceSnowLeopard.a:
+        * win/include/WebKitSystemInterface/WebKitSystemInterface.h:
+        * win/lib/WebKitSystemInterface.lib:
+
 2011-03-02  Daniel Cheng  <dcheng@chromium.org>
 
         Reviewed by David Levin.
index 2e63191..bdb0dd6 100644 (file)
@@ -233,6 +233,9 @@ void WKQTMovieDisableComponent(uint32_t[5]);
 
 CFStringRef WKCopyFoundationCacheDirectory(void);
 
+typedef const struct __CFURLStorageSession* CFURLStorageSessionRef;
+CFURLStorageSessionRef WKCreatePrivateStorageSession(CFStringRef);
+
 void WKSetVisibleApplicationName(CFStringRef);
 
 typedef enum {
index cf687a9..3f4edd7 100644 (file)
Binary files a/WebKitLibraries/libWebKitSystemInterfaceLeopard.a and b/WebKitLibraries/libWebKitSystemInterfaceLeopard.a differ
index 73fd479..c2d3805 100644 (file)
Binary files a/WebKitLibraries/libWebKitSystemInterfaceSnowLeopard.a and b/WebKitLibraries/libWebKitSystemInterfaceSnowLeopard.a differ
index 635b57b..77a061d 100644 (file)
@@ -64,6 +64,7 @@ typedef CVImageBufferRef CVPixelBufferRef;
 typedef struct _CAImageQueue *CAImageQueueRef;
 typedef unsigned long CFTypeID;
 typedef struct _CFURLCredential* WKCFURLCredentialRef;
+typedef const struct __CFURLStorageSession* CFURLStorageSessionRef;
 
 void wkSetFontSmoothingLevel(int type);
 int wkGetFontSmoothingLevel();
@@ -95,6 +96,8 @@ void wkSetClientCertificateInSSLProperties(CFMutableDictionaryRef, CFDataRef);
 CFArrayRef wkCFURLRequestCopyHTTPRequestBodyParts(CFURLRequestRef);
 void wkCFURLRequestSetHTTPRequestBodyParts(CFMutableURLRequestRef, CFArrayRef bodyParts);
 
+CFURLStorageSessionRef wkCreatePrivateStorageSession(CFStringRef identifier);
+
 CFArrayRef wkCFURLCacheCopyAllHostNamesInPersistentStore();
 void wkCFURLCacheDeleteHostNamesInPersistentStore(CFArrayRef hostNames);
 
index 1adfd48..ce2c296 100644 (file)
Binary files a/WebKitLibraries/win/lib/WebKitSystemInterface.lib and b/WebKitLibraries/win/lib/WebKitSystemInterface.lib differ