Skip to content
Permalink
Browse files
2009-03-24 Brent Fulgham <bfulgham@webkit.org>
        Reviewed by Adam Roben.

        https://bugs.webkit.org/show_bug.cgi?id=24779
        Conditionalize CFNetwork-specific code in WebView to permit
        support for other network backends.

        * WebView.cpp:
        (WebView::setCacheModel): Add CFNETWORK check around CFNetwork
        specific cache implementation.
        (updateSharedSettingsFromPreferencesIfNeeded): Add CFNETWORK
        check around use of CFHTTPCookie code.



Canonical link: https://commits.webkit.org/34006@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@41949 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Brent Fulgham committed Mar 24, 2009
1 parent d945103 commit ac5eb5756ed1b2828d5c222693fc5720f39dbd34
Showing 2 changed files with 30 additions and 2 deletions.
@@ -1,3 +1,17 @@
2009-03-24 Brent Fulgham <bfulgham@webkit.org>

Reviewed by Adam Roben.

https://bugs.webkit.org/show_bug.cgi?id=24779
Conditionalize CFNetwork-specific code in WebView to permit
support for other network backends.

* WebView.cpp:
(WebView::setCacheModel): Add CFNETWORK check around CFNetwork
specific cache implementation.
(updateSharedSettingsFromPreferencesIfNeeded): Add CFNETWORK
check around use of CFHTTPCookie code.

2009-03-23 Sam Weinig <sam@webkit.org>

Reviewed by Dan Bernstein.
@@ -50,7 +50,6 @@
#include "WebNotificationCenter.h"
#include "WebPreferences.h"
#pragma warning( push, 0 )
#include <CoreGraphics/CGContext.h>
#include <WebCore/ApplicationCacheStorage.h>
#include <WebCore/AXObjectCache.h>
#include <WebCore/BString.h>
@@ -105,10 +104,21 @@
#include <JavaScriptCore/InitializeThreading.h>
#include <JavaScriptCore/JSLock.h>
#include <JavaScriptCore/JSValue.h>

#if PLATFORM(CG)
#include <CoreGraphics/CGContext.h>
#endif

#if PLATFORM(CF)
#include <CoreFoundation/CoreFoundation.h>
#endif

#if USE(CFNETWORK)
#include <CFNetwork/CFURLCachePriv.h>
#include <CFNetwork/CFURLProtocolPriv.h>
#include <CoreFoundation/CoreFoundation.h>
#include <WebKitSystemInterface/WebKitSystemInterface.h>
#endif

#include <wtf/HashSet.h>
#include <dimm.h>
#include <oleacc.h>
@@ -366,6 +376,7 @@ void WebView::removeFromAllWebViewsSet()

void WebView::setCacheModel(WebCacheModel cacheModel)
{
#if USE(CFNETWORK)
if (s_didSetCacheModel && cacheModel == s_cacheModel)
return;

@@ -541,6 +552,7 @@ void WebView::setCacheModel(WebCacheModel cacheModel)
s_didSetCacheModel = true;
s_cacheModel = cacheModel;
return;
#endif
}

WebCacheModel WebView::cacheModel()
@@ -4227,9 +4239,11 @@ HRESULT updateSharedSettingsFromPreferencesIfNeeded(IWebPreferences* preferences
if (FAILED(hr))
return hr;

#if USE(CFNETWORK)
// Set cookie storage accept policy
if (CFHTTPCookieStorageRef cookieStorage = currentCookieStorage())
CFHTTPCookieStorageSetCookieAcceptPolicy(cookieStorage, acceptPolicy);
#endif

return S_OK;
}

0 comments on commit ac5eb57

Please sign in to comment.