https://bugs.webkit.org/show_bug.cgi?id=55435.
Reviewed by Sam Weinig.
Source/WebCore:
When Private Browsing is enabled, use cookies from a in-memory cookie storage based on the
Private Browsing Storage Session.
* WebCore.exp.in:
Add the new WKSI functions.
* platform/mac/WebCoreSystemInterface.h:
Ditto.
* platform/mac/WebCoreSystemInterface.mm:
Ditto.
* platform/mac/CookieJar.mm:
(WebCore::cookies):
If USE(CFURLSTORAGESESSIONS) and there is a Private Browsing Cookie Storage, call into WKSI.
Otherwise, behave the same as before.
(WebCore::cookieRequestHeaderFieldValue):
Ditto.
(WebCore::setCookies):
Ditto.
(WebCore::cookiesEnabled):
Ditto
(WebCore::getRawCookies):
Ditto.
(WebCore::deleteCookie):
Ditto.
* platform/network/CookieStorage.h:
* platform/network/cf/CookieStorageCFNet.cpp:
(WebCore::privateBrowsingCookieStorage):
Keep track of the Private Browsing Cookie Storage in a locally defined static inside a
function instead of at the global scope.
(WebCore::currentCookieStorage):
Use privateBrowsingCookieStorage.
(WebCore::setCurrentCookieStorage):
Ditto.
(WebCore::setCookieStoragePrivateBrowsingEnabled):
If USE(CFURLSTORAGESESSIONS), send the Private Browsing Storage Session to
wkCreatePrivateInMemoryHTTPCookieStorage.
* platform/network/mac/CookieStorageMac.mm:
(WebCore::privateBrowsingCookieStorage):
Keep track of the Private Browsing Cookie Storage.
(WebCore::setCookieStoragePrivateBrowsingEnabled):
If USE(CFURLSTORAGESESSIONS), then set or clear privateBrowsingCookieStorage().
Added a FIXME to observe changes to the Private Browsing Cookie Storage when it is defined.
* platform/network/mac/ResourceHandleMac.mm:
(WebCore::shouldRelaxThirdPartyCookiePolicy):
Refactor the logic to determine whether or not to relax the third party cookie policy here.
If USE(CFURLSTORAGESESSIONS), then get the information from the privateBrowsingCookieStorage.
(WebCore::ResourceHandle::createNSURLConnection):
Use shouldRelaxThirdPartyCookiePolicy.
(WebCore::ResourceHandle::loadResourceSynchronously):
Ditto.
Source/WebKit/mac:
When Private Browsing is enabled, use cookies from a in-memory cookie storage based on the
Private Browsing Storage Session.
* WebCoreSupport/WebSystemInterface.mm:
(InitWebCoreSystemInterface):
Add support for using the new WKSI functions in WebCore.
Source/WebKit2:
When Private Browsing is enabled, use cookies from a in-memory cookie storage based on the
Private Browsing Storage Session.
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface):
Add support for using the new WKSI functions in WebCore.
WebKitLibraries:
When Private Browsing is enabled, use cookies from a in-memory Cookie Storage based on the
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@80435
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2011-03-06 Jessie Berlin <jberlin@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ WebKit2: Use CFNetwork Sessions API.
+ https://bugs.webkit.org/show_bug.cgi?id=55435.
+
+ When Private Browsing is enabled, use cookies from a in-memory cookie storage based on the
+ Private Browsing Storage Session.
+
+ * WebCore.exp.in:
+ Add the new WKSI functions.
+ * platform/mac/WebCoreSystemInterface.h:
+ Ditto.
+ * platform/mac/WebCoreSystemInterface.mm:
+ Ditto.
+
+ * platform/mac/CookieJar.mm:
+ (WebCore::cookies):
+ If USE(CFURLSTORAGESESSIONS) and there is a Private Browsing Cookie Storage, call into WKSI.
+ Otherwise, behave the same as before.
+ (WebCore::cookieRequestHeaderFieldValue):
+ Ditto.
+ (WebCore::setCookies):
+ Ditto.
+ (WebCore::cookiesEnabled):
+ Ditto
+ (WebCore::getRawCookies):
+ Ditto.
+ (WebCore::deleteCookie):
+ Ditto.
+
+ * platform/network/CookieStorage.h:
+ * platform/network/cf/CookieStorageCFNet.cpp:
+ (WebCore::privateBrowsingCookieStorage):
+ Keep track of the Private Browsing Cookie Storage in a locally defined static inside a
+ function instead of at the global scope.
+ (WebCore::currentCookieStorage):
+ Use privateBrowsingCookieStorage.
+ (WebCore::setCurrentCookieStorage):
+ Ditto.
+ (WebCore::setCookieStoragePrivateBrowsingEnabled):
+ If USE(CFURLSTORAGESESSIONS), send the Private Browsing Storage Session to
+ wkCreatePrivateInMemoryHTTPCookieStorage.
+ * platform/network/mac/CookieStorageMac.mm:
+ (WebCore::privateBrowsingCookieStorage):
+ Keep track of the Private Browsing Cookie Storage.
+ (WebCore::setCookieStoragePrivateBrowsingEnabled):
+ If USE(CFURLSTORAGESESSIONS), then set or clear privateBrowsingCookieStorage().
+ Added a FIXME to observe changes to the Private Browsing Cookie Storage when it is defined.
+
+ * platform/network/mac/ResourceHandleMac.mm:
+ (WebCore::shouldRelaxThirdPartyCookiePolicy):
+ Refactor the logic to determine whether or not to relax the third party cookie policy here.
+ If USE(CFURLSTORAGESESSIONS), then get the information from the privateBrowsingCookieStorage.
+ (WebCore::ResourceHandle::createNSURLConnection):
+ Use shouldRelaxThirdPartyCookiePolicy.
+ (WebCore::ResourceHandle::loadResourceSynchronously):
+ Ditto.
+
2011-03-05 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r80428.
_wkSignalCFReadStreamHasBytes
_wkCreatePrivateStorageSession
_wkCopyRequestWithStorageSession
+_wkCreatePrivateInMemoryHTTPCookieStorage
+_wkGetHTTPCookieAcceptPolicy
+_wkHTTPCookiesForURL
+_wkSetHTTPCookiesForURL
+_wkDeleteHTTPCookie
#if !defined(NDEBUG)
__ZN7WebCore20LogNotYetImplementedE
#import "BlockExceptions.h"
#import "Cookie.h"
+#import "CookieStorage.h"
#import "Document.h"
#import "KURL.h"
+#import "WebCoreSystemInterface.h"
#import <wtf/RetainPtr.h>
#ifdef BUILDING_ON_TIGER
BEGIN_BLOCK_OBJC_EXCEPTIONS;
NSURL *cookieURL = url;
- NSArray *cookies = [[NSHTTPCookieStorage sharedHTTPCookieStorage] cookiesForURL:cookieURL];
+ NSArray *cookies;
+#if USE(CFURLSTORAGESESSIONS)
+ if (CFHTTPCookieStorageRef cookieStorage = privateBrowsingCookieStorage().get())
+ cookies = wkHTTPCookiesForURL(cookieStorage, cookieURL);
+ else
+#endif
+ cookies = [[NSHTTPCookieStorage sharedHTTPCookieStorage] cookiesForURL:cookieURL];
+
return [[NSHTTPCookie requestHeaderFieldsWithCookies:filterCookies(cookies).get()] objectForKey:@"Cookie"];
END_BLOCK_OBJC_EXCEPTIONS;
BEGIN_BLOCK_OBJC_EXCEPTIONS;
NSURL *cookieURL = url;
- NSArray *cookies = [[NSHTTPCookieStorage sharedHTTPCookieStorage] cookiesForURL:cookieURL];
+ NSArray *cookies;
+#if USE(CFURLSTORAGESESSIONS)
+ if (CFHTTPCookieStorageRef cookieStorage = privateBrowsingCookieStorage().get())
+ cookies = wkHTTPCookiesForURL(cookieStorage, cookieURL);
+ else
+#endif
+ cookies = [[NSHTTPCookieStorage sharedHTTPCookieStorage] cookiesForURL:cookieURL];
+
return [[NSHTTPCookie requestHeaderFieldsWithCookies:cookies] objectForKey:@"Cookie"];
END_BLOCK_OBJC_EXCEPTIONS;
String cookieString = cookieStr.contains('=') ? cookieStr : cookieStr + "=";
NSURL *cookieURL = url;
- NSArray *cookies = [NSHTTPCookie cookiesWithResponseHeaderFields:[NSDictionary dictionaryWithObject:cookieString forKey:@"Set-Cookie"] forURL:cookieURL];
- [[NSHTTPCookieStorage sharedHTTPCookieStorage] setCookies:filterCookies(cookies).get() forURL:cookieURL mainDocumentURL:document->firstPartyForCookies()];
+ RetainPtr<NSArray> filteredCookies = filterCookies([NSHTTPCookie cookiesWithResponseHeaderFields:[NSDictionary dictionaryWithObject:cookieString forKey:@"Set-Cookie"] forURL:cookieURL]);
+
+#if USE(CFURLSTORAGESESSIONS)
+ if (CFHTTPCookieStorageRef cookieStorage = privateBrowsingCookieStorage().get())
+ wkSetHTTPCookiesForURL(cookieStorage, filteredCookies.get(), cookieURL, document->firstPartyForCookies());
+ else
+#endif
+ [[NSHTTPCookieStorage sharedHTTPCookieStorage] setCookies:filteredCookies.get() forURL:cookieURL mainDocumentURL:document->firstPartyForCookies()];
END_BLOCK_OBJC_EXCEPTIONS;
}
{
BEGIN_BLOCK_OBJC_EXCEPTIONS;
- NSHTTPCookieAcceptPolicy cookieAcceptPolicy = [[NSHTTPCookieStorage sharedHTTPCookieStorage] cookieAcceptPolicy];
+ NSHTTPCookieAcceptPolicy cookieAcceptPolicy;
+#if USE(CFURLSTORAGESESSIONS)
+ if (CFHTTPCookieStorageRef cookieStorage = privateBrowsingCookieStorage().get())
+ cookieAcceptPolicy = wkGetHTTPCookieAcceptPolicy(cookieStorage);
+ else
+#endif
+ cookieAcceptPolicy = [[NSHTTPCookieStorage sharedHTTPCookieStorage] cookieAcceptPolicy];
+
return cookieAcceptPolicy == NSHTTPCookieAcceptPolicyAlways || cookieAcceptPolicy == NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain;
END_BLOCK_OBJC_EXCEPTIONS;
BEGIN_BLOCK_OBJC_EXCEPTIONS;
NSURL *cookieURL = url;
- NSArray *cookies = [[NSHTTPCookieStorage sharedHTTPCookieStorage] cookiesForURL:cookieURL];
+ NSArray *cookies;
+#if USE(CFURLSTORAGESESSIONS)
+ if (CFHTTPCookieStorageRef cookieStorage = privateBrowsingCookieStorage().get())
+ cookies = wkHTTPCookiesForURL(cookieStorage, cookieURL);
+ else
+#endif
+ cookies = [[NSHTTPCookieStorage sharedHTTPCookieStorage] cookiesForURL:cookieURL];
NSUInteger count = [cookies count];
rawCookies.reserveCapacity(count);
NSURL *cookieURL = url;
NSHTTPCookieStorage *cookieStorage = [NSHTTPCookieStorage sharedHTTPCookieStorage];
- NSArray *cookies = [cookieStorage cookiesForURL:cookieURL];
+ NSArray *cookies;
+#if USE(CFURLSTORAGESESSIONS)
+ CFHTTPCookieStorageRef cfCookieStorage = privateBrowsingCookieStorage().get();
+ if (cfCookieStorage)
+ cookies = wkHTTPCookiesForURL(cfCookieStorage, cookieURL);
+ else
+#endif
+ cookies = [cookieStorage cookiesForURL:cookieURL];
+
NSString *cookieNameString = (NSString *) cookieName;
NSUInteger count = [cookies count];
for (NSUInteger i = 0; i < count; ++i) {
NSHTTPCookie *cookie = (NSHTTPCookie *)[cookies objectAtIndex:i];
if ([[cookie name] isEqualToString:cookieNameString]) {
- [cookieStorage deleteCookie:cookie];
+#if USE(CFURLSTORAGESESSIONS)
+ if (cfCookieStorage)
+ wkDeleteHTTPCookie(cfCookieStorage, cookie);
+ else
+#endif
+ [cookieStorage deleteCookie:cookie];
break;
}
}
@class NSDate;
@class NSEvent;
@class NSFont;
+@class NSHTTPCookie;
@class NSImage;
@class NSMenu;
@class NSMutableURLRequest;
@class NSString;
@class NSTextFieldCell;
+@class NSURL;
@class NSURLConnection;
@class NSURLRequest;
@class NSURLResponse;
class NSDate;
class NSEvent;
class NSFont;
+class NSHTTPCookie;
class NSImage;
class NSMenu;
class NSMutableArray;
class NSMutableURLRequest;
+class NSURL;
class NSURLRequest;
class NSString;
class NSTextFieldCell;
extern CFURLStorageSessionRef (*wkCreatePrivateStorageSession)(CFStringRef);
extern NSURLRequest* (*wkCopyRequestWithStorageSession)(CFURLStorageSessionRef, NSURLRequest*);
+typedef struct OpaqueCFHTTPCookieStorage* CFHTTPCookieStorageRef;
+extern CFHTTPCookieStorageRef (*wkCreatePrivateInMemoryHTTPCookieStorage)(CFURLStorageSessionRef);
+extern unsigned (*wkGetHTTPCookieAcceptPolicy)(CFHTTPCookieStorageRef);
+extern NSArray *(*wkHTTPCookiesForURL)(CFHTTPCookieStorageRef, NSURL *);
+extern void (*wkSetHTTPCookiesForURL)(CFHTTPCookieStorageRef, NSArray *, NSURL *, NSURL *);
+extern void (*wkDeleteHTTPCookie)(CFHTTPCookieStorageRef, NSHTTPCookie *);
+
}
#endif
CFURLStorageSessionRef (*wkCreatePrivateStorageSession)(CFStringRef);
NSURLRequest* (*wkCopyRequestWithStorageSession)(CFURLStorageSessionRef, NSURLRequest*);
+CFHTTPCookieStorageRef (*wkCreatePrivateInMemoryHTTPCookieStorage)(CFURLStorageSessionRef);
+unsigned (*wkGetHTTPCookieAcceptPolicy)(CFHTTPCookieStorageRef);
+NSArray *(*wkHTTPCookiesForURL)(CFHTTPCookieStorageRef, NSURL *);
+void (*wkSetHTTPCookiesForURL)(CFHTTPCookieStorageRef, NSArray *, NSURL *, NSURL *);
+void (*wkDeleteHTTPCookie)(CFHTTPCookieStorageRef, NSHTTPCookie *);
#ifndef CookieStorage_h
#define CookieStorage_h
+#include <wtf/RetainPtr.h>
+
+typedef struct OpaqueCFHTTPCookieStorage* CFHTTPCookieStorageRef;
+
namespace WebCore {
+
+#if USE(CFURLSTORAGESESSIONS) && PLATFORM(MAC)
+RetainPtr<CFHTTPCookieStorageRef>& privateBrowsingCookieStorage();
+#endif
+
void setCookieStoragePrivateBrowsingEnabled(bool);
void startObservingCookieChanges();
void stopObservingCookieChanges();
#if USE(CFNETWORK)
#include "LoaderRunLoopCF.h"
+#include "ResourceHandle.h"
#include <CFNetwork/CFHTTPCookiesPriv.h>
#include <WebKitSystemInterface/WebKitSystemInterface.h>
#include <wtf/MainThread.h>
namespace WebCore {
-static CFHTTPCookieStorageRef s_cookieStorage;
+static RetainPtr<CFHTTPCookieStorageRef>& privateBrowsingCookieStorage()
+{
+ DEFINE_STATIC_LOCAL(RetainPtr<CFHTTPCookieStorageRef>, cookieStorage, ());
+ return cookieStorage;
+}
CFHTTPCookieStorageRef currentCookieStorage()
{
ASSERT(isMainThread());
- if (s_cookieStorage)
- return s_cookieStorage;
+ if (CFHTTPCookieStorageRef privateCookieStorage = privateBrowsingCookieStorage().get())
+ return privateCookieStorage;
return wkGetDefaultHTTPCookieStorage();
}
{
ASSERT(isMainThread());
- CFRetain(cookieStorage);
- if (s_cookieStorage)
- CFRelease(s_cookieStorage);
-
- s_cookieStorage = cookieStorage;
+ privateBrowsingCookieStorage().adoptCF(cookieStorage);
}
void setCookieStoragePrivateBrowsingEnabled(bool enabled)
{
ASSERT(isMainThread());
- if (s_cookieStorage)
- CFRelease(s_cookieStorage);
+ if (!enabled) {
+ privateBrowsingCookieStorage() = nullptr;
+ return;
+ }
- if (enabled)
- s_cookieStorage = wkCreatePrivateHTTPCookieStorage();
- else
- s_cookieStorage = 0;
+#if USE(CFURLSTORAGESESSIONS)
+ privateBrowsingCookieStorage().adoptCF(wkCreatePrivateInMemoryHTTPCookieStorage(ResourceHandle::privateBrowsingStorageSession()));
+#else
+ privateBrowsingCookieStorage().adoptCF(wkCreatePrivateInMemoryHTTPCookieStorage(0));
+#endif
}
static void notifyCookiesChangedOnMainThread(void* context)
#include "config.h"
#include "CookieStorage.h"
+#import "ResourceHandle.h"
#import "WebCoreSystemInterface.h"
#import <wtf/RetainPtr.h>
#import <wtf/UnusedParam.h>
namespace WebCore {
+#if USE(CFURLSTORAGESESSIONS)
+
+RetainPtr<CFHTTPCookieStorageRef>& privateBrowsingCookieStorage()
+{
+ DEFINE_STATIC_LOCAL(RetainPtr<CFHTTPCookieStorageRef>, cookieStorage, ());
+ return cookieStorage;
+}
+
+#endif
+
void setCookieStoragePrivateBrowsingEnabled(bool enabled)
{
+#if USE(CFURLSTORAGESESSIONS)
+ if (enabled && privateBrowsingCookieStorage())
+ return;
+
+ if (enabled && ResourceHandle::privateBrowsingStorageSession()) {
+ privateBrowsingCookieStorage().adoptCF(wkCreatePrivateInMemoryHTTPCookieStorage(ResourceHandle::privateBrowsingStorageSession()));
+
+ // FIXME: When Private Browsing is enabled, the Private Browsing Cookie Storage should be
+ // observed for changes, not the default Cookie Storage.
+
+ return;
+ }
+
+ privateBrowsingCookieStorage() = nullptr;
+#endif
wkSetCookieStoragePrivateBrowsingEnabled(enabled);
}
#import "Base64.h"
#import "BlobRegistry.h"
#import "BlockExceptions.h"
+#import "CookieStorage.h"
#import "CredentialStorage.h"
#import "CachedResourceLoader.h"
#import "EmptyProtocolDefinitions.h"
return NSFoundationVersionNumber > MaxFoundationVersionWithoutdidSendBodyDataDelegate;
}
+static bool shouldRelaxThirdPartyCookiePolicy(const KURL& url)
+{
+ // If a URL already has cookies, then we'll relax the 3rd party cookie policy and accept new cookies.
+
+ NSHTTPCookieStorage *sharedStorage = [NSHTTPCookieStorage sharedHTTPCookieStorage];
+
+ NSHTTPCookieAcceptPolicy cookieAcceptPolicy;
+#if USE(CFURLSTORAGESESSIONS)
+ CFHTTPCookieStorageRef cfPrivateBrowsingStorage = privateBrowsingCookieStorage().get();
+ if (cfPrivateBrowsingStorage)
+ cookieAcceptPolicy = wkGetHTTPCookieAcceptPolicy(cfPrivateBrowsingStorage);
+ else
+#endif
+ cookieAcceptPolicy = [sharedStorage cookieAcceptPolicy];
+
+ if (cookieAcceptPolicy != NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain)
+ return false;
+
+ NSArray *cookies;
+#if USE(CFURLSTORAGESESSIONS)
+ if (cfPrivateBrowsingStorage)
+ cookies = wkHTTPCookiesForURL(cfPrivateBrowsingStorage, url);
+ else
+#endif
+ cookies = [sharedStorage cookiesForURL:url];
+
+ return [cookies count];
+}
+
void ResourceHandle::createNSURLConnection(id delegate, bool shouldUseCredentialStorage, bool shouldContentSniff)
{
// Credentials for ftp can only be passed in URL, the connection:didReceiveAuthenticationChallenge: delegate call won't be made.
firstRequest().setURL(urlWithCredentials);
}
- // If a URL already has cookies, then we'll relax the 3rd party cookie policy and accept new cookies.
- NSHTTPCookieStorage *sharedStorage = [NSHTTPCookieStorage sharedHTTPCookieStorage];
- if ([sharedStorage cookieAcceptPolicy] == NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain && [[sharedStorage cookiesForURL:firstRequest().url()] count])
+ if (shouldRelaxThirdPartyCookiePolicy(firstRequest().url()))
firstRequest().setFirstPartyForCookies(firstRequest().url());
#if !defined(BUILDING_ON_TIGER)
UNUSED_PARAM(context);
NSURLRequest *firstRequest = request.nsURLRequest();
- // If a URL already has cookies, then we'll relax the 3rd party cookie policy and accept new cookies.
- NSHTTPCookieStorage *sharedStorage = [NSHTTPCookieStorage sharedHTTPCookieStorage];
- if ([sharedStorage cookieAcceptPolicy] == NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain && [[sharedStorage cookiesForURL:[firstRequest URL]] count]) {
+ if (shouldRelaxThirdPartyCookiePolicy([firstRequest URL])) {
NSMutableURLRequest *mutableRequest = [[firstRequest mutableCopy] autorelease];
[mutableRequest setMainDocumentURL:[mutableRequest URL]];
firstRequest = mutableRequest;
+2011-03-06 Jessie Berlin <jberlin@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ WebKit2: Use CFNetwork Sessions API.
+ https://bugs.webkit.org/show_bug.cgi?id=55435.
+
+ When Private Browsing is enabled, use cookies from a in-memory cookie storage based on the
+ Private Browsing Storage Session.
+
+ * WebCoreSupport/WebSystemInterface.mm:
+ (InitWebCoreSystemInterface):
+ Add support for using the new WKSI functions in WebCore.
+
2011-03-05 Ilya Sherman <isherman@chromium.org>
Reviewed by Darin Adler.
INIT(UnregisterUniqueIdForElement);
INIT(CreatePrivateStorageSession);
INIT(CopyRequestWithStorageSession);
+ INIT(CreatePrivateInMemoryHTTPCookieStorage);
+ INIT(GetHTTPCookieAcceptPolicy);
+ INIT(HTTPCookiesForURL);
+ INIT(SetHTTPCookiesForURL);
+ INIT(DeleteHTTPCookie);
didInit = true;
}
+2011-03-06 Jessie Berlin <jberlin@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ WebKit2: Use CFNetwork Sessions API.
+ https://bugs.webkit.org/show_bug.cgi?id=55435.
+
+ When Private Browsing is enabled, use cookies from a in-memory cookie storage based on the
+ Private Browsing Storage Session.
+
+ * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
+ (InitWebCoreSystemInterface):
+ Add support for using the new WKSI functions in WebCore.
+
2011-03-06 Oleg Romashin <romaxa@gmail.com>
Reviewed by Kenneth Rohde Christiansen.
INIT(SignalCFReadStreamHasBytes);
INIT(CreatePrivateStorageSession);
INIT(CopyRequestWithStorageSession);
+ INIT(CreatePrivateInMemoryHTTPCookieStorage);
+ INIT(GetHTTPCookieAcceptPolicy);
+ INIT(HTTPCookiesForURL);
+ INIT(SetHTTPCookiesForURL);
+ INIT(DeleteHTTPCookie);
#if !defined(BUILDING_ON_SNOW_LEOPARD)
INIT(IOSurfaceContextCreate);
+2011-03-06 Jessie Berlin <jberlin@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ WebKit2: Use CFNetwork Sessions API.
+ https://bugs.webkit.org/show_bug.cgi?id=55435.
+
+ When Private Browsing is enabled, use cookies from a in-memory Cookie Storage based on the
+ 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-04 Jessie Berlin <jberlin@apple.com>
Reviewed by Maciej Stachowiak.
NSURLRequest *WKCopyRequestWithStorageSession(CFURLStorageSessionRef, NSURLRequest*);
NSCachedURLResponse *WKCachedResponseForRequest(CFURLStorageSessionRef, NSURLRequest*);
+typedef struct OpaqueCFHTTPCookieStorage* CFHTTPCookieStorageRef;
+CFHTTPCookieStorageRef WKCreatePrivateInMemoryHTTPCookieStorage(CFURLStorageSessionRef);
+unsigned WKGetHTTPCookieAcceptPolicy(CFHTTPCookieStorageRef);
+NSArray *WKHTTPCookiesForURL(CFHTTPCookieStorageRef, NSURL *);
+void WKSetHTTPCookiesForURL(CFHTTPCookieStorageRef, NSArray *, NSURL *, NSURL *);
+void WKDeleteHTTPCookie(CFHTTPCookieStorageRef, NSHTTPCookie *);
+
void WKSetVisibleApplicationName(CFStringRef);
typedef enum {
void* wkGetSSLPeerCertificateData(CFDictionaryRef);
void* wkGetSSLCertificateChainContext(CFDictionaryRef);
CFHTTPCookieStorageRef wkGetDefaultHTTPCookieStorage();
-CFHTTPCookieStorageRef wkCreatePrivateHTTPCookieStorage();
+CFHTTPCookieStorageRef wkCreatePrivateInMemoryHTTPCookieStorage(CFURLStorageSessionRef);
void wkSetCFURLRequestShouldContentSniff(CFMutableURLRequestRef, bool);
CFStringRef wkCopyFoundationCacheDirectory();
void wkSetClientCertificateInSSLProperties(CFMutableDictionaryRef, CFDataRef);