Title: [91200] trunk/Source/WebCore
- Revision
- 91200
- Author
- [email protected]
- Date
- 2011-07-18 11:55:56 -0700 (Mon, 18 Jul 2011)
Log Message
Part of https://bugs.webkit.org/show_bug.cgi?id=63674
Get webkit to compile with USE(CFNETWORK) enabled on Mac
Reviewed by David Kilzer.
Get coookie storage code to work with USE(CFNETWORK) enabled on Mac.
No new tests because no change in functionality.
* platform/network/cf/CookieStorageCFNet.cpp:
(WebCore::defaultCookieStorage):
(WebCore::defaultSessionCookieStorage):
* platform/network/cf/ResourceHandleCFNet.cpp:
(WebCore::ResourceHandle::createPrivateBrowsingStorageSession):
* platform/network/mac/CookieStorageMac.mm:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (91199 => 91200)
--- trunk/Source/WebCore/ChangeLog 2011-07-18 18:55:48 UTC (rev 91199)
+++ trunk/Source/WebCore/ChangeLog 2011-07-18 18:55:56 UTC (rev 91200)
@@ -5,6 +5,24 @@
Reviewed by David Kilzer.
+ Get coookie storage code to work with USE(CFNETWORK) enabled on Mac.
+
+ No new tests because no change in functionality.
+
+ * platform/network/cf/CookieStorageCFNet.cpp:
+ (WebCore::defaultCookieStorage):
+ (WebCore::defaultSessionCookieStorage):
+ * platform/network/cf/ResourceHandleCFNet.cpp:
+ (WebCore::ResourceHandle::createPrivateBrowsingStorageSession):
+ * platform/network/mac/CookieStorageMac.mm:
+
+2011-07-18 Pratik Solanki <[email protected]>
+
+ Part of https://bugs.webkit.org/show_bug.cgi?id=63674
+ Get webkit to compile with USE(CFNETWORK) enabled on Mac
+
+ Reviewed by David Kilzer.
+
* WebCore.exp.in:
2011-07-18 Gavin Barraclough <[email protected]>
Modified: trunk/Source/WebCore/platform/network/cf/CookieStorageCFNet.cpp (91199 => 91200)
--- trunk/Source/WebCore/platform/network/cf/CookieStorageCFNet.cpp 2011-07-18 18:55:48 UTC (rev 91199)
+++ trunk/Source/WebCore/platform/network/cf/CookieStorageCFNet.cpp 2011-07-18 18:55:56 UTC (rev 91200)
@@ -33,10 +33,15 @@
#include "LoaderRunLoopCF.h"
#include "ResourceHandle.h"
#include <CFNetwork/CFHTTPCookiesPriv.h>
-#include <WebKitSystemInterface/WebKitSystemInterface.h>
#include <wtf/MainThread.h>
#include <wtf/RetainPtr.h>
+#if PLATFORM(MAC)
+#include "WebCoreSystemInterface.h"
+#elif PLATFORM(WIN)
+#include <WebKitSystemInterface/WebKitSystemInterface.h>
+#endif
+
#if USE(PLATFORM_STRATEGIES)
#include "CookiesStrategy.h"
#include "PlatformStrategies.h"
@@ -62,14 +67,13 @@
#if USE(CFNETWORK)
-static RetainPtr<CFHTTPCookieStorageRef>& defaultSessionCookieStorage()
+CFHTTPCookieStorageRef defaultCookieStorage()
{
- DEFINE_STATIC_LOCAL(RetainPtr<CFHTTPCookieStorageRef>, cookieStorage, ());
-#if USE(CFURLSTORAGESESSIONS) && PLATFORM(WIN)
- if (!cookieStorage && ResourceHandle::defaultStorageSession())
- cookieStorage.adoptCF(wkCopyHTTPCookieStorage(ResourceHandle::defaultStorageSession()));
+#if PLATFORM(WIN)
+ if (CFHTTPCookieStorageRef defaultCookieStorage = defaultSessionCookieStorage().get())
+ return defaultCookieStorage;
#endif
- return cookieStorage;
+ return wkGetDefaultHTTPCookieStorage();
}
CFHTTPCookieStorageRef currentCookieStorage()
@@ -81,6 +85,20 @@
return defaultCookieStorage();
}
+#endif
+
+#if USE(CFNETWORK) && PLATFORM(WIN)
+
+static RetainPtr<CFHTTPCookieStorageRef>& defaultSessionCookieStorage()
+{
+ DEFINE_STATIC_LOCAL(RetainPtr<CFHTTPCookieStorageRef>, cookieStorage, ());
+#if USE(CFURLSTORAGESESSIONS)
+ if (!cookieStorage && ResourceHandle::defaultStorageSession())
+ cookieStorage.adoptCF(wkCopyHTTPCookieStorage(ResourceHandle::defaultStorageSession()));
+#endif
+ return cookieStorage;
+}
+
void setCurrentCookieStorage(CFHTTPCookieStorageRef cookieStorage)
{
ASSERT(isMainThread());
@@ -105,13 +123,6 @@
privateBrowsingCookieStorage().adoptCF(wkCreateInMemoryHTTPCookieStorage());
}
-CFHTTPCookieStorageRef defaultCookieStorage()
-{
- if (CFHTTPCookieStorageRef defaultCookieStorage = defaultSessionCookieStorage().get())
- return defaultCookieStorage;
- return wkGetDefaultHTTPCookieStorage();
-}
-
static void notifyCookiesChangedOnMainThread(void*)
{
ASSERT(isMainThread());
@@ -165,6 +176,6 @@
CFHTTPCookieStorageUnscheduleFromRunLoop(cookieStorage, runLoop, kCFRunLoopCommonModes);
}
-#endif // USE(CFNETWORK)
+#endif // USE(CFNETWORK) && PLATFORM(WIN)
} // namespace WebCore
Modified: trunk/Source/WebCore/platform/network/cf/ResourceHandleCFNet.cpp (91199 => 91200)
--- trunk/Source/WebCore/platform/network/cf/ResourceHandleCFNet.cpp 2011-07-18 18:55:48 UTC (rev 91199)
+++ trunk/Source/WebCore/platform/network/cf/ResourceHandleCFNet.cpp 2011-07-18 18:55:56 UTC (rev 91200)
@@ -770,7 +770,11 @@
RetainPtr<CFURLStorageSessionRef> ResourceHandle::createPrivateBrowsingStorageSession(CFStringRef identifier)
{
+#if PLATFORM(WIN)
return RetainPtr<CFURLStorageSessionRef>(AdoptCF, wkCreatePrivateStorageSession(identifier, defaultStorageSession()));
+#else
+ return RetainPtr<CFURLStorageSessionRef>(AdoptCF, wkCreatePrivateStorageSession(identifier));
+#endif
}
String ResourceHandle::privateBrowsingStorageSessionIdentifierDefaultBase()
Modified: trunk/Source/WebCore/platform/network/mac/CookieStorageMac.mm (91199 => 91200)
--- trunk/Source/WebCore/platform/network/mac/CookieStorageMac.mm 2011-07-18 18:55:48 UTC (rev 91199)
+++ trunk/Source/WebCore/platform/network/mac/CookieStorageMac.mm 2011-07-18 18:55:56 UTC (rev 91200)
@@ -28,8 +28,6 @@
#import "ResourceHandle.h"
-#if !USE(CFNETWORK)
-
#import "WebCoreSystemInterface.h"
#import <wtf/RetainPtr.h>
#import <wtf/UnusedParam.h>
@@ -117,5 +115,3 @@
}
}
-
-#endif // !USE(CFNETWORK)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes