Add Offline Application Cache to Clear Private Data

This commit is contained in:
Christian Dywan 2011-03-14 01:23:39 +01:00
parent 7ac71b6bba
commit ef88658853

View file

@ -1745,6 +1745,15 @@ midori_clear_html5_databases_cb (void)
webkit_remove_all_web_databases (); webkit_remove_all_web_databases ();
} }
#endif #endif
#if WEBKIT_CHECK_VERSION (1, 3, 13)
static void
midori_clear_offline_appcache_cb (void)
{
/* Changing the size implies clearing the cache */
unsigned long long maximum = webkit_application_cache_get_maximum_size ();
webkit_application_cache_set_maximum_size (maximum - 1);
}
#endif
int int
main (int argc, main (int argc,
@ -1988,6 +1997,10 @@ main (int argc,
sokoke_register_privacy_item ("html5-databases", _("HTML5 _Databases"), sokoke_register_privacy_item ("html5-databases", _("HTML5 _Databases"),
G_CALLBACK (midori_clear_html5_databases_cb)); G_CALLBACK (midori_clear_html5_databases_cb));
#endif #endif
#if WEBKIT_CHECK_VERSION (1, 3, 13)
sokoke_register_privacy_item ("offline-appcache", _("Offline Application Cache"),
G_CALLBACK (midori_clear_offline_appcache_cb));
#endif
/* Web Application support */ /* Web Application support */
if (webapp) if (webapp)