Clean up which storage cookie jar functions use
authorap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 7 Nov 2012 00:41:30 +0000 (00:41 +0000)
committerap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 7 Nov 2012 00:41:30 +0000 (00:41 +0000)
commitd7ee526f660315e4d12e8715aa86d90843a0ba4f
tree6649cdfd5a264632c94da5ba07ab03e8269b6863
parentbc04252a981cf7a2fa05b1fa87ce1e22c18e80b3
Clean up which storage cookie jar functions use
https://bugs.webkit.org/show_bug.cgi?id=101395

Reviewed by Brady Eidson.

Source/WebCore:

* WebCore.exp.in:
* platform/mac/WebCoreSystemInterface.h:
* platform/mac/WebCoreSystemInterface.mm:
Updated for two new WKSI functions.

* platform/CookieJar.h: Added explanatory comments.

* platform/mac/CookieJar.mm:
(WebCore::cookies): Removed fallback on NSHTTPCookieStorage, the WKSI function
already implements it.
(WebCore::cookieRequestHeaderFieldValue): Ditto.
(WebCore::setCookies): Ditto.
(WebCore::cookiesEnabled): Ditto.
(WebCore::getRawCookies): Ditto.
(WebCore::deleteCookie): Ditto.
(WebCore::getHostnamesWithCookies): This function used to look at NSHTTPCookieStorage
exclusively. While it makes sense to bypass private storage session, default storage
session (currently only used for testing on Mac) is never OK to bypass. Changed to
use a WKSI function that supports both.
(WebCore::deleteCookiesForHostname): Ditto.
(WebCore::deleteAllCookies): Ditto.

* platform/network/cf/CookieJarCFNet.cpp:
(WebCore::getHostnamesWithCookies):
(WebCore::deleteCookiesForHostname):
(WebCore::deleteAllCookies):
Updated to match Foundation, so now these functions bypass private session.

* platform/network/cf/CookieStorageCFNet.cpp:
(WebCore::currentCFHTTPCookieStorage): Updated a comment.
(WebCore::defaultCFHTTPCookieStorage):  Added a function that returns cookie storage
for non-private session (or null if that would be an NSHTTPCookieStorage).
(WebCore::startObservingCookieChanges): We do not want to observe private cookies
here, and we certainly don't want a mismatch between start/stop due to private
browsing mode changes.
(WebCore::stopObservingCookieChanges): Ditto.

* platform/network/cf/CookieStorageCFNet.h: Added defaultCFHTTPCookieStorage().

Source/WebKit/mac:

* WebCoreSupport/WebSystemInterface.mm: (InitWebCoreSystemInterface): Updated for
two new functions.

Source/WebKit2:

* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: (InitWebCoreSystemInterface):
Updated for two new functions.

WebKitLibraries:

* WebKitSystemInterface.h:
* libWebKitSystemInterfaceLion.a:
* libWebKitSystemInterfaceMountainLion.a:
Added WKHTTPCookies() and WKDeleteAllHTTPCookies(). Updated ifdefs for currently
supported OS versions.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@133694 268f45cc-cd09-0410-ab3c-d52691b4dbfc
17 files changed:
Source/WebCore/ChangeLog
Source/WebCore/WebCore.exp.in
Source/WebCore/platform/CookieJar.h
Source/WebCore/platform/mac/CookieJar.mm
Source/WebCore/platform/mac/WebCoreSystemInterface.h
Source/WebCore/platform/mac/WebCoreSystemInterface.mm
Source/WebCore/platform/network/cf/CookieJarCFNet.cpp
Source/WebCore/platform/network/cf/CookieStorageCFNet.cpp
Source/WebCore/platform/network/cf/CookieStorageCFNet.h
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/libWebKitSystemInterfaceLion.a
WebKitLibraries/libWebKitSystemInterfaceMountainLion.a