Changeset 185317 in webkit
- Timestamp:
- Jun 8, 2015 8:59:14 AM (9 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r185315 r185317 1 2015-06-08 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 REGRESSION(r185251): [GTK] webkit_web_context_set_disk_cache_directory() doesn't work when using shared secondary process model after r185251 4 https://bugs.webkit.org/show_bug.cgi?id=145751 5 6 Reviewed by Darin Adler. 7 8 In r185251 the CFNetwork cache was disabled in the web process, 9 but it also removed the disk cache directory web process 10 initialization parameter. While we support networking in the web 11 process when shared secondary process model is used, the network 12 cache should still work. We can remove this if we eventually 13 switch to use the network process unconditionally. 14 15 * Shared/WebProcessCreationParameters.cpp: 16 (WebKit::WebProcessCreationParameters::encode): Encode disk cache directory. 17 (WebKit::WebProcessCreationParameters::decode): Decode disk cache directory. 18 * Shared/WebProcessCreationParameters.h: Bring back disk cache directory only for soup. 19 * UIProcess/gtk/WebProcessPoolGtk.cpp: 20 (WebKit::WebProcessPool::platformInitializeWebProcess): Initialize disk cache directory parameter. 21 * WebProcess/soup/WebProcessSoup.cpp: 22 (WebKit::WebProcess::platformInitializeWebProcess): Use the disck cache directory parameter again. 23 1 24 2015-06-08 Csaba Osztrogonác <ossy@webkit.org> 2 25 -
trunk/Source/WebKit2/Shared/WebProcessCreationParameters.cpp
r185251 r185317 97 97 encoder << urlSchemesRegisteredForCustomProtocols; 98 98 #if USE(SOUP) 99 encoder << diskCacheDirectory; 99 100 encoder << cookiePersistentStoragePath; 100 101 encoder << cookiePersistentStorageType; … … 218 219 return false; 219 220 #if USE(SOUP) 221 if (!decoder.decode(parameters.diskCacheDirectory)) 222 return false; 220 223 if (!decoder.decode(parameters.cookiePersistentStoragePath)) 221 224 return false; -
trunk/Source/WebKit2/Shared/WebProcessCreationParameters.h
r185251 r185317 102 102 Vector<String> urlSchemesRegisteredForCustomProtocols; 103 103 #if USE(SOUP) 104 String diskCacheDirectory; 104 105 String cookiePersistentStoragePath; 105 106 uint32_t cookiePersistentStorageType; -
trunk/Source/WebKit2/UIProcess/gtk/WebProcessPoolGtk.cpp
r185311 r185317 29 29 #include "WebProcessPool.h" 30 30 31 #include "APIProcessPoolConfiguration.h" 31 32 #include "Logging.h" 32 33 #include "WebCookieManagerProxy.h" … … 106 107 107 108 parameters.ignoreTLSErrors = m_ignoreTLSErrors; 109 parameters.diskCacheDirectory = m_configuration->diskCacheDirectory(); 108 110 } 109 111 } -
trunk/Source/WebKit2/WebProcess/soup/WebProcessSoup.cpp
r185300 r185317 32 32 #endif 33 33 34 #include "APIProcessPoolConfiguration.h"35 34 #include "CertificateInfo.h" 36 35 #include "WebCookieManager.h" … … 137 136 return; 138 137 139 auto configuration = API::ProcessPoolConfiguration::createWithLegacyOptions(); 140 141 ASSERT(!configuration->diskCacheDirectory().isEmpty()); 138 ASSERT(!parameters.diskCacheDirectory.isEmpty()); 142 139 143 140 // We used to use the given cache directory for the soup cache, but now we use a subdirectory to avoid 144 141 // conflicts with other cache files in the same directory. Remove the old cache files if they still exist. 145 WebCore::SoupNetworkSession::defaultSession().clearCache( configuration->diskCacheDirectory());142 WebCore::SoupNetworkSession::defaultSession().clearCache(WebCore::directoryName(parameters.diskCacheDirectory)); 146 143 147 String diskCachePath = WebCore::pathByAppendingComponent(configuration->diskCacheDirectory(), "webkit"); 148 GRefPtr<SoupCache> soupCache = adoptGRef(soup_cache_new(diskCachePath.utf8().data(), SOUP_CACHE_SINGLE_USER)); 144 #if ENABLE(NETWORK_CACHE) 145 // When network cache is enabled, the disk cache directory is the network process one. 146 CString diskCachePath = WebCore::pathByAppendingComponent(WebCore::directoryName(parameters.diskCacheDirectory), "webkit").utf8(); 147 #else 148 CString diskCachePath = parameters.diskCacheDirectory.utf8(); 149 #endif 150 151 GRefPtr<SoupCache> soupCache = adoptGRef(soup_cache_new(diskCachePath.data(), SOUP_CACHE_SINGLE_USER)); 149 152 WebCore::SoupNetworkSession::defaultSession().setCache(soupCache.get()); 150 153 // Set an initial huge max_size for the SoupCache so the call to soup_cache_load() won't evict any cached
Note: See TracChangeset
for help on using the changeset viewer.