Title: [99578] trunk/Source/WebKit/gtk
Revision
99578
Author
commit-qu...@webkit.org
Date
2011-11-08 09:36:04 -0800 (Tue, 08 Nov 2011)

Log Message

[WK][GTK] Application cache directory is incorrectly set
https://bugs.webkit.org/show_bug.cgi?id=71769

Patch by Zan Dobersek <zandober...@gmail.com> on 2011-11-08
Reviewed by Martin Robinson.

Set the application cache directory to be placed in current user's
cache directory and update documentation for
webkit_application_cache_get_database_directory_path after these
changes and changes in r80715;

* webkit/webkitapplicationcache.cpp:
* webkit/webkitglobals.cpp:
(webkitInit): Switch one string formation to use GOwnPtr<gchar>.

Modified Paths

Diff

Modified: trunk/Source/WebKit/gtk/ChangeLog (99577 => 99578)


--- trunk/Source/WebKit/gtk/ChangeLog	2011-11-08 17:33:07 UTC (rev 99577)
+++ trunk/Source/WebKit/gtk/ChangeLog	2011-11-08 17:36:04 UTC (rev 99578)
@@ -1,3 +1,19 @@
+2011-11-08  Zan Dobersek  <zandober...@gmail.com>
+
+        [WK][GTK] Application cache directory is incorrectly set
+        https://bugs.webkit.org/show_bug.cgi?id=71769
+
+        Reviewed by Martin Robinson.
+
+        Set the application cache directory to be placed in current user's
+        cache directory and update documentation for
+        webkit_application_cache_get_database_directory_path after these
+        changes and changes in r80715;
+
+        * webkit/webkitapplicationcache.cpp:
+        * webkit/webkitglobals.cpp:
+        (webkitInit): Switch one string formation to use GOwnPtr<gchar>.
+
 2011-11-03  Darin Adler  <da...@apple.com>
 
         Change remaining callers of releaseRef to call leakRef

Modified: trunk/Source/WebKit/gtk/webkit/webkitapplicationcache.cpp (99577 => 99578)


--- trunk/Source/WebKit/gtk/webkit/webkitapplicationcache.cpp	2011-11-08 17:33:07 UTC (rev 99577)
+++ trunk/Source/WebKit/gtk/webkit/webkitapplicationcache.cpp	2011-11-08 17:36:04 UTC (rev 99578)
@@ -65,13 +65,13 @@
 }
 
 /**
- * webkit_spplication_cache_get_database_directory_path:
+ * webkit_application_cache_get_database_directory_path:
  *
- * Returns the current path to the directory WebKit will write web application
- * cache databases. By default this path is set to $XDG_DATA_HOME/webkit/databases
- * with webkit_application_cache_set_database_directory_path
+ * Returns the path to the directory WebKit will write web application
+ * cache databases to. By default this path is set to
+ * $XDG_CACHE_HOME/webkitgtk/applications and cannot be modified.
  *
- * Returns: the current application cache database directory path
+ * Returns: the application cache database directory path
  *
  * Since: 1.3.13
  **/

Modified: trunk/Source/WebKit/gtk/webkit/webkitglobals.cpp (99577 => 99578)


--- trunk/Source/WebKit/gtk/webkit/webkitglobals.cpp	2011-11-08 17:33:07 UTC (rev 99577)
+++ trunk/Source/WebKit/gtk/webkit/webkitglobals.cpp	2011-11-08 17:36:04 UTC (rev 99578)
@@ -316,11 +316,11 @@
     // that may only be done by the main thread.
     atomicCanonicalTextEncodingName("UTF-8");
 
-    gchar* databaseDirectory = g_build_filename(g_get_user_data_dir(), "webkit", "databases", NULL);
-    webkit_set_web_database_directory_path(databaseDirectory);
-    WebCore::cacheStorage().setCacheDirectory(databaseDirectory);
+    GOwnPtr<gchar> databaseDirectory(g_build_filename(g_get_user_data_dir(), "webkit", "databases", NULL));
+    webkit_set_web_database_directory_path(databaseDirectory.get());
 
-    g_free(databaseDirectory);
+    GOwnPtr<gchar> cacheDirectory(g_build_filename(g_get_user_cache_dir(), "webkitgtk", "applications", NULL));
+    WebCore::cacheStorage().setCacheDirectory(cacheDirectory.get());
 
     PageGroup::setShouldTrackVisitedLinks(true);
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to