[epiphany] Set the disk cache directory depending on the ephy mode in WebKit2
- From: Carlos Garcia Campos <carlosgc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] Set the disk cache directory depending on the ephy mode in WebKit2
- Date: Tue, 12 Mar 2013 19:07:23 +0000 (UTC)
commit fb1168182e81dfc295fd9927805f1e5038d8b49c
Author: Carlos Garcia Campos <cgarcia igalia com>
Date: Tue Mar 12 14:27:38 2013 +0100
Set the disk cache directory depending on the ephy mode in WebKit2
https://bugzilla.gnome.org/show_bug.cgi?id=695345
embed/ephy-embed-single.c | 1 -
src/ephy-main.c | 9 +++++++++
2 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/embed/ephy-embed-single.c b/embed/ephy-embed-single.c
index 289fa16..861b4ef 100644
--- a/embed/ephy-embed-single.c
+++ b/embed/ephy-embed-single.c
@@ -186,7 +186,6 @@ ephy_embed_single_initialize (EphyEmbedSingle *single)
char *filename;
char *cookie_policy;
- /* TODO: SoupCache, SSL */
web_context = webkit_web_context_get_default ();
/* Store cookies in moz-compatible SQLite format */
diff --git a/src/ephy-main.c b/src/ephy-main.c
index 6aa3b8c..83cace3 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 ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]