summaryrefslogtreecommitdiff
path: root/Source/WebKit2/WebProcess/win/WebProcessWin.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2012-11-07 11:22:47 +0100
committerSimon Hausmann <simon.hausmann@digia.com>2012-11-07 11:22:47 +0100
commitcfd86b747d32ac22246a1aa908eaa720c63a88c1 (patch)
tree24d68c6f61c464ecba1e05670b80390ea3b0e50c /Source/WebKit2/WebProcess/win/WebProcessWin.cpp
parent69d7c744c9de19d152dbe2d8e46eb7dfd4511d1a (diff)
downloadqtwebkit-cfd86b747d32ac22246a1aa908eaa720c63a88c1.tar.gz
Imported WebKit commit 20271caf2e2c016d5cef40184cddeefeac4f1876 (http://svn.webkit.org/repository/webkit/trunk@133733)
New snapshot that contains all previous fixes as well as build fix for latest QtMultimedia API changes.
Diffstat (limited to 'Source/WebKit2/WebProcess/win/WebProcessWin.cpp')
-rw-r--r--Source/WebKit2/WebProcess/win/WebProcessWin.cpp13
1 files changed, 3 insertions, 10 deletions
diff --git a/Source/WebKit2/WebProcess/win/WebProcessWin.cpp b/Source/WebKit2/WebProcess/win/WebProcessWin.cpp
index 25dbc36c4..40066a276 100644
--- a/Source/WebKit2/WebProcess/win/WebProcessWin.cpp
+++ b/Source/WebKit2/WebProcess/win/WebProcessWin.cpp
@@ -71,15 +71,13 @@ void WebProcess::platformSetCacheModel(CacheModel cacheModel)
{
#if USE(CFNETWORK)
RetainPtr<CFStringRef> cfurlCacheDirectory;
-#if USE(CFURLSTORAGESESSIONS)
if (CFURLStorageSessionRef defaultStorageSession = ResourceHandle::defaultStorageSession())
cfurlCacheDirectory.adoptCF(wkCopyFoundationCacheDirectory(defaultStorageSession));
else
-#endif
cfurlCacheDirectory.adoptCF(wkCopyFoundationCacheDirectory(0));
if (!cfurlCacheDirectory)
- cfurlCacheDirectory.adoptCF(WebCore::localUserSpecificStorageDirectory().createCFString());
+ cfurlCacheDirectory = WebCore::localUserSpecificStorageDirectory().createCFString();
// As a fudge factor, use 1000 instead of 1024, in case the reported byte
// count doesn't align exactly to a megabyte boundary.
@@ -103,11 +101,9 @@ void WebProcess::platformSetCacheModel(CacheModel cacheModel)
pageCache()->setCapacity(pageCacheCapacity);
RetainPtr<CFURLCacheRef> cfurlCache;
-#if USE(CFURLSTORAGESESSIONS)
if (CFURLStorageSessionRef defaultStorageSession = ResourceHandle::defaultStorageSession())
cfurlCache.adoptCF(wkCopyURLCache(defaultStorageSession));
else
-#endif // USE(CFURLSTORAGESESSIONS)
cfurlCache.adoptCF(CFURLCacheCopySharedURLCache());
CFURLCacheSetMemoryCapacity(cfurlCache.get(), urlCacheMemoryCapacity);
@@ -122,11 +118,9 @@ void WebProcess::platformClearResourceCaches(ResourceCachesToClear cachesToClear
return;
RetainPtr<CFURLCacheRef> cache;
-#if USE(CFURLSTORAGESESSIONS)
if (CFURLStorageSessionRef defaultStorageSession = ResourceHandle::defaultStorageSession())
cache.adoptCF(wkCopyURLCache(defaultStorageSession));
else
-#endif // USE(CFURLSTORAGESESSIONS)
cache.adoptCF(CFURLCacheCopySharedURLCache());
CFURLCacheRemoveAllCachedResponses(cache.get());
@@ -148,13 +142,12 @@ void WebProcess::platformInitializeWebProcess(const WebProcessCreationParameters
if (defaultStorageSession)
return;
- RetainPtr<CFStringRef> cachePath(AdoptCF, parameters.diskCacheDirectory.createCFString());
- if (!cachePath)
+ if (!parameters.diskCacheDirectory)
return;
CFIndex cacheDiskCapacity = parameters.cfURLCacheDiskCapacity;
CFIndex cacheMemoryCapacity = parameters.cfURLCacheMemoryCapacity;
- RetainPtr<CFURLCacheRef> uiProcessCache(AdoptCF, CFURLCacheCreate(kCFAllocatorDefault, cacheMemoryCapacity, cacheDiskCapacity, cachePath.get()));
+ RetainPtr<CFURLCacheRef> uiProcessCache(AdoptCF, CFURLCacheCreate(kCFAllocatorDefault, cacheMemoryCapacity, cacheDiskCapacity, parameters.diskCacheDirectory.createCFString().get()));
CFURLCacheSetSharedURLCache(uiProcessCache.get());
#endif // USE(CFNETWORK)
}