[Xfce4-commits] <midori:master> Add Offline Application Cache to Clear Private Data

Christian Dywan noreply at xfce.org
Mon Mar 14 01:24:01 CET 2011


Updating branch refs/heads/master
         to ef88658853c174620f08657300f828fed82ef327 (commit)
       from 7ac71b6bba5e32073d353a5b72ec395109895360 (commit)

commit ef88658853c174620f08657300f828fed82ef327
Author: Christian Dywan <christian at twotoasts.de>
Date:   Mon Mar 14 01:23:39 2011 +0100

    Add Offline Application Cache to Clear Private Data

 midori/main.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/midori/main.c b/midori/main.c
index 5043bf8..cc739e4 100644
--- a/midori/main.c
+++ b/midori/main.c
@@ -1745,6 +1745,15 @@ midori_clear_html5_databases_cb (void)
     webkit_remove_all_web_databases ();
 }
 #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
 main (int    argc,
@@ -1988,6 +1997,10 @@ main (int    argc,
     sokoke_register_privacy_item ("html5-databases", _("HTML5 _Databases"),
         G_CALLBACK (midori_clear_html5_databases_cb));
     #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 */
     if (webapp)



More information about the Xfce4-commits mailing list