aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-main.c
diff options
context:
space:
mode:
authorCarlos Garcia Campos <cgarcia@igalia.com>2013-03-12 21:27:38 +0800
committerCarlos Garcia Campos <carlosgc@gnome.org>2013-03-13 03:07:11 +0800
commitfb1168182e81dfc295fd9927805f1e5038d8b49c (patch)
tree71123d65e64da88cafdbf36d10efee82f493f62e /src/ephy-main.c
parent7c634f7c171250525eb63b3024e289bbea270458 (diff)
downloadgsoc2013-epiphany-fb1168182e81dfc295fd9927805f1e5038d8b49c.tar
gsoc2013-epiphany-fb1168182e81dfc295fd9927805f1e5038d8b49c.tar.gz
gsoc2013-epiphany-fb1168182e81dfc295fd9927805f1e5038d8b49c.tar.bz2
gsoc2013-epiphany-fb1168182e81dfc295fd9927805f1e5038d8b49c.tar.lz
gsoc2013-epiphany-fb1168182e81dfc295fd9927805f1e5038d8b49c.tar.xz
gsoc2013-epiphany-fb1168182e81dfc295fd9927805f1e5038d8b49c.tar.zst
gsoc2013-epiphany-fb1168182e81dfc295fd9927805f1e5038d8b49c.zip
Set the disk cache directory depending on the ephy mode in WebKit2
https://bugzilla.gnome.org/show_bug.cgi?id=695345
Diffstat (limited to 'src/ephy-main.c')
-rw-r--r--src/ephy-main.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/ephy-main.c b/src/ephy-main.c
index 6aa3b8c23..83cace3de 100644
--- a/src/ephy-main.c
+++ b/src/ephy-main.c
@@ -231,6 +231,7 @@ main (int argc,
EphyFileHelpersFlags flags;
#ifdef HAVE_WEBKIT2
char *pid_str;
+ char *disk_cache_dir;
#endif
#ifdef ENABLE_NLS
@@ -470,6 +471,14 @@ main (int argc,
/* Set the web extensions dir ASAP before the process is launched */
webkit_web_context_set_web_extensions_directory (webkit_web_context_get_default (),
EPHY_WEB_EXTENSIONS_DIR);
+
+ /* Disk Cache */
+ disk_cache_dir = g_build_filename (EPHY_EMBED_SHELL_MODE_HAS_PRIVATE_PROFILE (mode) ?
+ ephy_dot_dir () : g_get_user_cache_dir (),
+ g_get_prgname (), NULL);
+ webkit_web_context_set_disk_cache_directory (webkit_web_context_get_default (),
+ disk_cache_dir);
+ g_free (disk_cache_dir);
#endif
ephy_embed_prefs_init ();