Changeset 80180 in webkit
- Timestamp:
- Mar 2, 2011 4:07:15 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 26 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r80179 r80180 1 2011-03-02 Jessie Berlin <jberlin@apple.com> 2 3 Reviewed by Adam Roben. 4 5 WebKit2: Use CFNetwork Sessions API. 6 https://bugs.webkit.org/show_bug.cgi?id=55435 7 8 Add the ability to create a Private Browsing storage session. 9 10 * wtf/Platform.h: 11 Add a new #define for using CF Storage Sessions. 12 1 13 2011-03-02 Oliver Hunt <oliver@apple.com> 2 14 -
trunk/Source/JavaScriptCore/wtf/Platform.h
r80166 r80180 696 696 #if USE(CFNETWORK) || PLATFORM(MAC) 697 697 #define WTF_USE_CFURLCACHE 1 698 #define WTF_USE_CFURLSTORAGESESSIONS 1 698 699 #endif 699 700 -
trunk/Source/WebCore/ChangeLog
r80177 r80180 1 2011-03-02 Jessie Berlin <jberlin@apple.com> 2 3 Reviewed by Adam Roben. 4 5 WebKit2: Use CFNetwork Sessions API. 6 https://bugs.webkit.org/show_bug.cgi?id=55435 7 8 Add the ability to create a Private Browsing Storage Session. 9 10 * WebCore.exp.in: 11 Export the symbol for ResourceHandle::setPrivateBrowsingStorageSessionIdentifierBase. 12 13 * page/Settings.cpp: 14 (WebCore::Settings::setPrivateBrowsingEnabled): 15 Propagate the private browsing state to the ResourceHandle. 16 17 * platform/mac/WebCoreSystemInterface.h: 18 Add the function declaration for wkCreatePrivateStorageSession. 19 * platform/mac/WebCoreSystemInterface.mm: 20 21 * platform/network/ResourceHandle.cpp: 22 (WebCore::privateStorageSession): 23 Since the same Private Browsing Storage Session will need to be accessed throughout the loading 24 code and will need to be used by all web pages and page groups, make it a global static. 25 (WebCore::privateBrowsingStorageSessionIdentifierBase): 26 Ditto, since the identifier is needed to create the Private Browsing Storage Session. 27 (WebCore::ResourceHandle::setPrivateBrowsingEnabled): 28 If enabled, create and store the Private Browsing Storage Session. 29 (WebCore::ResourceHandle::privateBrowsingStorageSession): 30 (WebCore::ResourceHandle::setPrivateBrowsingStorageSessionIdentifierBase): 31 * platform/network/ResourceHandle.h: 32 33 * platform/network/cf/ResourceHandleCFNet.cpp: 34 (WebCore::ResourceHandle::createPrivateBrowsingStorageSession): 35 The call to wkCreatePrivateStorageSession needs to be in a file including the correct 36 version of WKSI. 37 (WebCore::ResourceHandle::privateBrowsingStorageSessionIdentifierDefaultBase): 38 Return the bundle identifier. 39 * platform/network/mac/ResourceHandleMac.mm: 40 (WebCore::ResourceHandle::createPrivateBrowsingStorageSession): 41 The call to wkCreatePrivateStorageSession needs to be in a file importing the correct 42 version of WKSI. 43 (WebCore::ResourceHandle::privateBrowsingStorageSessionIdentifierDefaultBase): 44 Return the bundle identifier. 45 1 46 2011-03-02 Daniel Cheng <dcheng@chromium.org> 2 47 -
trunk/Source/WebCore/WebCore.exp.in
r80059 r80180 1334 1334 _wkSignalCFReadStreamError 1335 1335 _wkSignalCFReadStreamHasBytes 1336 _wkCreatePrivateStorageSession 1336 1337 1337 1338 #if !defined(NDEBUG) … … 1782 1783 __ZN7WebCore12EventHandler18handleGestureEventERKNS_20PlatformGestureEventE 1783 1784 #endif 1785 1786 #if USE(CFURLSTORAGESESSIONS) 1787 __ZN7WebCore14ResourceHandle46setPrivateBrowsingStorageSessionIdentifierBaseERKN3WTF6StringE 1788 #endif -
trunk/Source/WebCore/page/Settings.cpp
r78788 r80180 38 38 #include "Page.h" 39 39 #include "PageCache.h" 40 #include "ResourceHandle.h" 40 41 #include "StorageMap.h" 41 42 #include <limits> … … 338 339 return; 339 340 341 #if USE(CFURLSTORAGESESSIONS) 342 ResourceHandle::setPrivateBrowsingEnabled(privateBrowsingEnabled); 343 #endif 344 340 345 // FIXME: We can only enable cookie private browsing mode globally, so it's misleading to have it as a per-page setting. 341 346 setCookieStoragePrivateBrowsingEnabled(privateBrowsingEnabled); -
trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.h
r78241 r80180 236 236 extern AXUIElementRef (*wkCreateAXUIElementRef)(id element); 237 237 238 typedef const struct __CFURLStorageSession* CFURLStorageSessionRef; 239 extern CFURLStorageSessionRef (*wkCreatePrivateStorageSession)(CFStringRef); 240 238 241 } 239 242 -
trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.mm
r78241 r80180 173 173 AXUIElementRef (*wkCreateAXUIElementRef)(id element); 174 174 175 CFURLStorageSessionRef (*wkCreatePrivateStorageSession)(CFStringRef); 176 -
trunk/Source/WebCore/platform/network/ResourceHandle.cpp
r67291 r80180 34 34 #include "Timer.h" 35 35 #include <algorithm> 36 #include <wtf/text/CString.h> 36 37 37 38 namespace WebCore { … … 186 187 } 187 188 189 #if USE(CFURLSTORAGESESSIONS) 190 191 static RetainPtr<CFURLStorageSessionRef>& privateStorageSession() 192 { 193 DEFINE_STATIC_LOCAL(RetainPtr<CFURLStorageSessionRef>, storageSession, ()); 194 return storageSession; 195 } 196 197 static String& privateBrowsingStorageSessionIdentifierBase() 198 { 199 DEFINE_STATIC_LOCAL(String, base, ()); 200 return base; 201 } 202 203 void ResourceHandle::setPrivateBrowsingEnabled(bool enabled) 204 { 205 if (!enabled) { 206 privateStorageSession() = nullptr; 207 return; 208 } 209 210 if (privateStorageSession()) 211 return; 212 213 String base = privateBrowsingStorageSessionIdentifierBase().isNull() ? privateBrowsingStorageSessionIdentifierDefaultBase() : privateBrowsingStorageSessionIdentifierBase(); 214 RetainPtr<CFStringRef> cfIdentifier(AdoptCF, String::format("%s.PrivateBrowsing", base.utf8().data()).createCFString()); 215 216 privateStorageSession() = createPrivateBrowsingStorageSession(cfIdentifier.get()); 217 } 218 219 CFURLStorageSessionRef ResourceHandle::privateBrowsingStorageSession() 220 { 221 return privateStorageSession().get(); 222 } 223 224 void ResourceHandle::setPrivateBrowsingStorageSessionIdentifierBase(const String& identifier) 225 { 226 privateBrowsingStorageSessionIdentifierBase() = identifier; 227 } 228 229 #endif // USE(CFURLSTORAGESESSIONS) 230 188 231 } // namespace WebCore -
trunk/Source/WebCore/platform/network/ResourceHandle.h
r79434 r80180 72 72 #endif 73 73 74 #if USE(CFURLSTORAGESESSIONS) 75 typedef const struct __CFURLStorageSession* CFURLStorageSessionRef; 76 #endif 77 74 78 namespace WebCore { 75 79 … … 187 191 void fireFailure(Timer<ResourceHandle>*); 188 192 193 #if USE(CFURLSTORAGESESSIONS) 194 static void setPrivateBrowsingEnabled(bool); 195 static CFURLStorageSessionRef privateBrowsingStorageSession(); 196 static void setPrivateBrowsingStorageSessionIdentifierBase(const String&); 197 #endif 198 189 199 using RefCounted<ResourceHandle>::ref; 190 200 using RefCounted<ResourceHandle>::deref; … … 215 225 #endif 216 226 227 #if USE(CFURLSTORAGESESSIONS) 228 static RetainPtr<CFURLStorageSessionRef> createPrivateBrowsingStorageSession(CFStringRef identifier); 229 static String privateBrowsingStorageSessionIdentifierDefaultBase(); 230 #endif 231 217 232 friend class ResourceHandleInternal; 218 233 OwnPtr<ResourceHandleInternal> d; -
trunk/Source/WebCore/platform/network/cf/ResourceHandleCFNet.cpp
r76472 r80180 717 717 } 718 718 719 RetainPtr<CFURLStorageSessionRef> ResourceHandle::createPrivateBrowsingStorageSession(CFStringRef identifier) 720 { 721 return RetainPtr<CFURLStorageSessionRef>(AdoptCF, wkCreatePrivateStorageSession(identifier)); 722 } 723 724 String ResourceHandle::privateBrowsingStorageSessionIdentifierDefaultBase() 725 { 726 return String(reinterpret_cast<CFStringRef>(CFBundleGetValueForInfoDictionaryKey(CFBundleGetMainBundle(), kCFBundleIdentifierKey))); 727 } 728 719 729 void WebCoreSynchronousLoaderClient::willSendRequest(ResourceHandle* handle, ResourceRequest& request, const ResourceResponse& /*redirectResponse*/) 720 730 { -
trunk/Source/WebCore/platform/network/mac/ResourceHandleMac.mm
r76472 r80180 694 694 } 695 695 696 RetainPtr<CFURLStorageSessionRef> ResourceHandle::createPrivateBrowsingStorageSession(CFStringRef identifier) 697 { 698 return RetainPtr<CFURLStorageSessionRef>(AdoptCF, wkCreatePrivateStorageSession(identifier)); 699 } 700 701 String ResourceHandle::privateBrowsingStorageSessionIdentifierDefaultBase() 702 { 703 return String([[NSBundle mainBundle] bundleIdentifier]); 704 } 705 696 706 } // namespace WebCore 697 707 -
trunk/Source/WebKit/mac/ChangeLog
r80166 r80180 1 2011-03-02 Jessie Berlin <jberlin@apple.com> 2 3 Reviewed by Adam Roben. 4 5 WebKit2: Use CFNetwork Sessions API. 6 https://bugs.webkit.org/show_bug.cgi?id=55435. 7 8 Add the ability to create a Private Browsing Storage Session. 9 10 * WebCoreSupport/WebSystemInterface.mm: 11 (InitWebCoreSystemInterface): 12 Support calling wkCreatePrivateStorageSession from WebCore. 13 1 14 2011-03-02 Daniel Cheng <dcheng@chromium.org> 2 15 -
trunk/Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm
r78241 r80180 155 155 INIT(ContentAreaDidHide); 156 156 INIT(ScrollbarPainterUsesOverlayScrollers); 157 INIT(CreatePrivateStorageSession); 157 158 #endif 158 159 -
trunk/Source/WebKit2/ChangeLog
r80145 r80180 1 2011-03-02 Jessie Berlin <jberlin@apple.com> 2 3 Reviewed by Adam Roben. 4 5 WebKit2: Use CFNetwork Sessions API. 6 https://bugs.webkit.org/show_bug.cgi?id=55435 7 8 Add the ability to create a Private Browsing Storage Session. 9 10 * Shared/WebProcessCreationParameters.cpp: 11 (WebKit::WebProcessCreationParameters::encode): 12 Encode the UI Process bundle identifier. 13 (WebKit::WebProcessCreationParameters::decode): 14 Decode the UI Process bundle identifier. 15 * Shared/WebProcessCreationParameters.h: 16 17 * UIProcess/mac/WebContextMac.mm: 18 (WebKit::WebContext::platformInitializeWebProcess): 19 Grab the bundle identifier and use it to set the WebProcessCreationParameter. 20 * UIProcess/win/WebContextWin.cpp: 21 (WebKit::WebContext::platformInitializeWebProcess): 22 Ditto. 23 24 * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: 25 (InitWebCoreSystemInterface): 26 Support using the wkCreatePrivateStorageSession WKSI in WebCore. 27 28 * WebProcess/WebProcess.cpp: 29 (WebKit::WebProcess::initializeWebProcess): 30 Set the base for the Private Browsing Storage Session identifier to be the bundle identifier 31 from the UI Process so that WebKit1 would create a Private Browsing Storage Session with the 32 same identifier as WebKit2. 33 1 34 2011-03-01 Brian Weinstein <bweinstein@apple.com> 2 35 -
trunk/Source/WebKit2/Shared/WebProcessCreationParameters.cpp
r79253 r80180 60 60 encoder->encode(textCheckerState); 61 61 encoder->encode(defaultRequestTimeoutInterval); 62 #if USE(CFURLSTORAGESESSIONS) 63 encoder->encode(uiProcessBundleIdentifier); 64 #endif 62 65 #if PLATFORM(MAC) 63 66 encoder->encode(parentProcessName); … … 106 109 if (!decoder->decode(parameters.defaultRequestTimeoutInterval)) 107 110 return false; 111 #if USE(CFURLSTORAGESESSIONS) 112 if (!decoder->decode(parameters.uiProcessBundleIdentifier)) 113 return false; 114 #endif 108 115 109 116 #if PLATFORM(MAC) -
trunk/Source/WebKit2/Shared/WebProcessCreationParameters.h
r79927 r80180 76 76 double defaultRequestTimeoutInterval; 77 77 78 #if USE(CFURLSTORAGESESSIONS) 79 String uiProcessBundleIdentifier; 80 #endif 81 78 82 #if PLATFORM(MAC) 79 83 String parentProcessName; -
trunk/Source/WebKit2/UIProcess/mac/WebContextMac.mm
r79927 r80180 94 94 // FIXME: This should really be configurable; we shouldn't just blindly allow read access to the UI process bundle. 95 95 parameters.uiProcessBundleResourcePath = fileSystemRepresentation([[NSBundle mainBundle] resourcePath]); 96 97 parameters.uiProcessBundleIdentifier = String([[NSBundle mainBundle] bundleIdentifier]); 96 98 } 97 99 -
trunk/Source/WebKit2/UIProcess/win/WebContextWin.cpp
r79927 r80180 69 69 if (parameters.cfURLCachePath[parameters.cfURLCachePath.length() - 1] == '/') 70 70 parameters.cfURLCachePath.remove(parameters.cfURLCachePath.length() - 1); 71 72 parameters.uiProcessBundleIdentifier = String(reinterpret_cast<CFStringRef>(CFBundleGetValueForInfoDictionaryKey(CFBundleGetMainBundle(), kCFBundleIdentifierKey))); 71 73 #endif 72 74 } -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm
r78241 r80180 94 94 INIT(SignalCFReadStreamError); 95 95 INIT(SignalCFReadStreamHasBytes); 96 INIT(CreatePrivateStorageSession); 96 97 97 98 #if !defined(BUILDING_ON_SNOW_LEOPARD) -
trunk/Source/WebKit2/WebProcess/WebProcess.cpp
r79654 r80180 59 59 #include <WebCore/Page.h> 60 60 #include <WebCore/PageGroup.h> 61 #include <WebCore/ResourceHandle.h> 61 62 #include <WebCore/SchemeRegistry.h> 62 63 #include <WebCore/SecurityOrigin.h> … … 213 214 if (parameters.shouldAlwaysUseComplexTextCodePath) 214 215 setAlwaysUsesComplexTextCodePath(true); 216 217 #if USE(CFURLSTORAGESESSIONS) 218 WebCore::ResourceHandle::setPrivateBrowsingStorageSessionIdentifierBase(parameters.uiProcessBundleIdentifier); 219 #endif 215 220 } 216 221 -
trunk/WebKitLibraries/ChangeLog
r80166 r80180 1 2011-03-02 Jessie Berlin <jberlin@apple.com> 2 3 Rubber-stamped by Adam Roben. 4 5 WebKit2: Use CFNetwork Sessions API. 6 https://bugs.webkit.org/show_bug.cgi?id=55435 7 8 Add the ability to create a Private Browsing Storage Session. 9 10 Update WebKitSystemInterface headers and libraries with the new functions. 11 12 * WebKitSystemInterface.h: 13 * libWebKitSystemInterfaceLeopard.a: 14 * libWebKitSystemInterfaceSnowLeopard.a: 15 * win/include/WebKitSystemInterface/WebKitSystemInterface.h: 16 * win/lib/WebKitSystemInterface.lib: 17 1 18 2011-03-02 Daniel Cheng <dcheng@chromium.org> 2 19 -
trunk/WebKitLibraries/WebKitSystemInterface.h
r80011 r80180 233 233 234 234 CFStringRef WKCopyFoundationCacheDirectory(void); 235 236 typedef const struct __CFURLStorageSession* CFURLStorageSessionRef; 237 CFURLStorageSessionRef WKCreatePrivateStorageSession(CFStringRef); 235 238 236 239 void WKSetVisibleApplicationName(CFStringRef); -
trunk/WebKitLibraries/win/include/WebKitSystemInterface/WebKitSystemInterface.h
r79252 r80180 65 65 typedef unsigned long CFTypeID; 66 66 typedef struct _CFURLCredential* WKCFURLCredentialRef; 67 typedef const struct __CFURLStorageSession* CFURLStorageSessionRef; 67 68 68 69 void wkSetFontSmoothingLevel(int type); … … 95 96 CFArrayRef wkCFURLRequestCopyHTTPRequestBodyParts(CFURLRequestRef); 96 97 void wkCFURLRequestSetHTTPRequestBodyParts(CFMutableURLRequestRef, CFArrayRef bodyParts); 98 99 CFURLStorageSessionRef wkCreatePrivateStorageSession(CFStringRef identifier); 97 100 98 101 CFArrayRef wkCFURLCacheCopyAllHostNamesInPersistentStore();
Note: See TracChangeset
for help on using the changeset viewer.