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)
commit15abb45eff03d2e281313d188b7aab5202833c41
treee7aedc418815d8c40ed1ec210181be21a91b75c4
parent40787762782b8491e5c5fe62ea274db28c1032dd
Source/JavaScriptCore: 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.

* 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