Changeset 148886 in webkit
- Timestamp:
- Apr 22, 2013 8:57:22 AM (11 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r148883 r148886 1 2013-04-22 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 [SOUP] Soup disk cache should respect the diskCacheDirectory from the process initial parameters 4 https://bugs.webkit.org/show_bug.cgi?id=111845 5 6 Reviewed by Anders Carlsson. 7 8 Move the cache initialization to platformInitializeWebProcess() to 9 create the cache using the directory received from the UI 10 process. This allows to add public API to set a different disk 11 cache directory from the UI process. 12 13 * UIProcess/efl/WebContextEfl.cpp: 14 (WebKit::WebContext::platformDefaultDiskCacheDirectory): Return 15 default disk cache directory. 16 * UIProcess/gtk/WebContextGtk.cpp: 17 (WebKit::WebContext::platformDefaultDiskCacheDirectory): Ditto. 18 * WebProcess/efl/WebProcessMainEfl.cpp: 19 (WebKit::WebProcessMainEfl): Remove soup cache initialization. 20 * WebProcess/gtk/WebProcessMainGtk.cpp: 21 (WebKit::WebProcessMainGtk): Ditto. 22 * WebProcess/soup/WebProcessSoup.cpp: 23 (WebKit::WebProcess::platformInitializeWebProcess): Initialize 24 soup cache. 25 1 26 2013-04-22 Krzysztof Wolanski <k.wolanski@samsung.com>: 2 27 -
trunk/Source/WebKit2/UIProcess/efl/WebContextEfl.cpp
r138783 r148886 118 118 String WebContext::platformDefaultDiskCacheDirectory() const 119 119 { 120 notImplemented(); 121 return String(); 120 return String::fromUTF8(efreet_cache_home_get()) + "/WebKitEfl"; 122 121 } 123 122 -
trunk/Source/WebKit2/UIProcess/gtk/WebContextGtk.cpp
r148267 r148886 120 120 String WebContext::platformDefaultDiskCacheDirectory() const 121 121 { 122 notImplemented();123 return String();122 GOwnPtr<char> diskCacheDirectory(g_build_filename(g_get_user_cache_dir(), g_get_prgname(), NULL)); 123 return WebCore::filenameToString(diskCacheDirectory.get()); 124 124 } 125 125 -
trunk/Source/WebKit2/WebProcess/efl/WebProcessMainEfl.cpp
r148519 r148886 124 124 } 125 125 126 // Set SOUP cache.127 String soupCacheDirectory = String::fromUTF8(efreet_cache_home_get()) + "/WebKitEfl";128 SoupCache* soupCache = soup_cache_new(soupCacheDirectory.utf8().data(), SOUP_CACHE_SINGLE_USER);129 soup_session_add_feature(session, SOUP_SESSION_FEATURE(soupCache));130 soup_cache_load(soupCache);131 132 126 int socket = atoi(argv[1]); 133 127 … … 139 133 RunLoop::run(); 140 134 141 soup_cache_flush(soupCache); 142 soup_cache_dump(soupCache); 143 g_object_unref(soupCache); 135 if (SoupSessionFeature* soupCache = soup_session_get_feature(session, SOUP_TYPE_CACHE)) { 136 soup_cache_flush(SOUP_CACHE(soupCache)); 137 soup_cache_dump(SOUP_CACHE(soupCache)); 138 } 144 139 145 140 edje_shutdown(); -
trunk/Source/WebKit2/WebProcess/gtk/WebProcessMainGtk.cpp
r148519 r148886 76 76 SOUP_SESSION_SSL_STRICT, FALSE, NULL); 77 77 78 GOwnPtr<char> soupCacheDirectory(g_build_filename(g_get_user_cache_dir(), g_get_prgname(), NULL));79 GRefPtr<SoupCache> soupCache = adoptGRef(soup_cache_new(soupCacheDirectory.get(), SOUP_CACHE_SINGLE_USER));80 soup_session_add_feature(session, SOUP_SESSION_FEATURE(soupCache.get()));81 soup_cache_load(soupCache.get());82 83 78 RunLoop::run(); 84 79 85 soup_cache_flush(soupCache.get()); 86 soup_cache_dump(soupCache.get()); 80 if (SoupSessionFeature* soupCache = soup_session_get_feature(session, SOUP_TYPE_CACHE)) { 81 soup_cache_flush(SOUP_CACHE(soupCache)); 82 soup_cache_dump(SOUP_CACHE(soupCache)); 83 } 87 84 88 85 return 0; -
trunk/Source/WebKit2/WebProcess/soup/WebProcessSoup.cpp
r148507 r148886 176 176 #endif 177 177 178 ASSERT(!parameters.diskCacheDirectory.isEmpty()); 179 GRefPtr<SoupCache> soupCache = adoptGRef(soup_cache_new(parameters.diskCacheDirectory.utf8().data(), SOUP_CACHE_SINGLE_USER)); 180 soup_session_add_feature(WebCore::ResourceHandle::defaultSession(), SOUP_SESSION_FEATURE(soupCache.get())); 181 soup_cache_load(soupCache.get()); 182 178 183 if (!parameters.languages.isEmpty()) 179 184 setSoupSessionAcceptLanguage(parameters.languages);
Note: See TracChangeset
for help on using the changeset viewer.