Changeset 91200 in webkit
- Timestamp:
- Jul 18, 2011 11:55:56 AM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r91198 r91200 1 2011-07-18 Pratik Solanki <psolanki@apple.com> 2 3 Part of https://bugs.webkit.org/show_bug.cgi?id=63674 4 Get webkit to compile with USE(CFNETWORK) enabled on Mac 5 6 Reviewed by David Kilzer. 7 8 Get coookie storage code to work with USE(CFNETWORK) enabled on Mac. 9 10 No new tests because no change in functionality. 11 12 * platform/network/cf/CookieStorageCFNet.cpp: 13 (WebCore::defaultCookieStorage): 14 (WebCore::defaultSessionCookieStorage): 15 * platform/network/cf/ResourceHandleCFNet.cpp: 16 (WebCore::ResourceHandle::createPrivateBrowsingStorageSession): 17 * platform/network/mac/CookieStorageMac.mm: 18 1 19 2011-07-18 Pratik Solanki <psolanki@apple.com> 2 20 -
trunk/Source/WebCore/platform/network/cf/CookieStorageCFNet.cpp
r86285 r91200 34 34 #include "ResourceHandle.h" 35 35 #include <CFNetwork/CFHTTPCookiesPriv.h> 36 #include <WebKitSystemInterface/WebKitSystemInterface.h>37 36 #include <wtf/MainThread.h> 38 37 #include <wtf/RetainPtr.h> 38 39 #if PLATFORM(MAC) 40 #include "WebCoreSystemInterface.h" 41 #elif PLATFORM(WIN) 42 #include <WebKitSystemInterface/WebKitSystemInterface.h> 43 #endif 39 44 40 45 #if USE(PLATFORM_STRATEGIES) … … 63 68 #if USE(CFNETWORK) 64 69 65 static RetainPtr<CFHTTPCookieStorageRef>& defaultSessionCookieStorage()70 CFHTTPCookieStorageRef defaultCookieStorage() 66 71 { 67 DEFINE_STATIC_LOCAL(RetainPtr<CFHTTPCookieStorageRef>, cookieStorage, ()); 68 #if USE(CFURLSTORAGESESSIONS) && PLATFORM(WIN) 69 if (!cookieStorage && ResourceHandle::defaultStorageSession()) 70 cookieStorage.adoptCF(wkCopyHTTPCookieStorage(ResourceHandle::defaultStorageSession())); 72 #if PLATFORM(WIN) 73 if (CFHTTPCookieStorageRef defaultCookieStorage = defaultSessionCookieStorage().get()) 74 return defaultCookieStorage; 71 75 #endif 72 return cookieStorage;76 return wkGetDefaultHTTPCookieStorage(); 73 77 } 74 78 … … 80 84 return cookieStorage; 81 85 return defaultCookieStorage(); 86 } 87 88 #endif 89 90 #if USE(CFNETWORK) && PLATFORM(WIN) 91 92 static RetainPtr<CFHTTPCookieStorageRef>& defaultSessionCookieStorage() 93 { 94 DEFINE_STATIC_LOCAL(RetainPtr<CFHTTPCookieStorageRef>, cookieStorage, ()); 95 #if USE(CFURLSTORAGESESSIONS) 96 if (!cookieStorage && ResourceHandle::defaultStorageSession()) 97 cookieStorage.adoptCF(wkCopyHTTPCookieStorage(ResourceHandle::defaultStorageSession())); 98 #endif 99 return cookieStorage; 82 100 } 83 101 … … 104 122 #endif 105 123 privateBrowsingCookieStorage().adoptCF(wkCreateInMemoryHTTPCookieStorage()); 106 }107 108 CFHTTPCookieStorageRef defaultCookieStorage()109 {110 if (CFHTTPCookieStorageRef defaultCookieStorage = defaultSessionCookieStorage().get())111 return defaultCookieStorage;112 return wkGetDefaultHTTPCookieStorage();113 124 } 114 125 … … 166 177 } 167 178 168 #endif // USE(CFNETWORK) 179 #endif // USE(CFNETWORK) && PLATFORM(WIN) 169 180 170 181 } // namespace WebCore -
trunk/Source/WebCore/platform/network/cf/ResourceHandleCFNet.cpp
r91102 r91200 771 771 RetainPtr<CFURLStorageSessionRef> ResourceHandle::createPrivateBrowsingStorageSession(CFStringRef identifier) 772 772 { 773 #if PLATFORM(WIN) 773 774 return RetainPtr<CFURLStorageSessionRef>(AdoptCF, wkCreatePrivateStorageSession(identifier, defaultStorageSession())); 775 #else 776 return RetainPtr<CFURLStorageSessionRef>(AdoptCF, wkCreatePrivateStorageSession(identifier)); 777 #endif 774 778 } 775 779 -
trunk/Source/WebCore/platform/network/mac/CookieStorageMac.mm
r85721 r91200 28 28 29 29 #import "ResourceHandle.h" 30 31 #if !USE(CFNETWORK)32 30 33 31 #import "WebCoreSystemInterface.h" … … 118 116 119 117 } 120 121 #endif // !USE(CFNETWORK)
Note: See TracChangeset
for help on using the changeset viewer.