From d6a599dbc9d824a462b2b206316e102bf8136446 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Wed, 11 Jul 2012 13:45:28 +0200 Subject: Imported WebKit commit 8ff1f22783a32de82fee915abd55bd1b298f2644 (http://svn.webkit.org/repository/webkit/trunk@122325) New snapshot that should work with the latest Qt build system changes --- .../WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) (limited to 'Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp') diff --git a/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp b/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp index 372f46637..8a0625c07 100644 --- a/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp +++ b/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp @@ -162,11 +162,10 @@ WebKitWebContext* webkit_web_context_get_default(void) * these caches, including various WebCore caches. * * Browsers can improve document load speed substantially by - * specifying WEBKIT_CACHE_MODEL_WEB_BROWSER. Applications without a + * specifying %WEBKIT_CACHE_MODEL_WEB_BROWSER. Applications without a * browsing interface can reduce memory usage substantially by - * specifying WEBKIT_CACHE_MODEL_DOCUMENT_VIEWER. The default value is - * WEBKIT_CACHE_MODEL_WEB_BROWSER. - * + * specifying %WEBKIT_CACHE_MODEL_DOCUMENT_VIEWER. The default value is + * %WEBKIT_CACHE_MODEL_WEB_BROWSER. */ void webkit_web_context_set_cache_model(WebKitWebContext* context, WebKitCacheModel model) { @@ -221,6 +220,21 @@ WebKitCacheModel webkit_web_context_get_cache_model(WebKitWebContext* context) return WEBKIT_CACHE_MODEL_WEB_BROWSER; } +/** + * webkit_web_context_clear_cache: + * @context: a #WebKitWebContext + * + * Clears all resources currently cached. + * See also webkit_web_context_set_cache_model(). + */ +void webkit_web_context_clear_cache(WebKitWebContext* context) +{ + g_return_if_fail(WEBKIT_IS_WEB_CONTEXT(context)); + + WebKitWebContextPrivate* priv = context->priv; + WKResourceCacheManagerClearCacheForAllOrigins(WKContextGetResourceCacheManager(priv->context.get()), WKResourceCachesToClearAll); +} + typedef HashMap > DownloadsMap; static DownloadsMap& downloadsMap() -- cgit v1.2.1