[epiphany/gnome-3-30] Create sync web context using Epiphany website data manager



commit 8eb548f24faa8d182d1d40a8930be576f597eff4
Author: Michael Catanzaro <mcatanzaro igalia com>
Date:   Fri Aug 31 17:32:41 2018 -0500

    Create sync web context using Epiphany website data manager
    
    I was confused why ~/.local/share/webkitgtk was being created in Ephy
    Tech Preview, until I realized the only storage was being used for
    accounts.firefox.com. Let's save this data under Epiphany's proper
    cache and data directories.

 src/prefs-dialog.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/src/prefs-dialog.c b/src/prefs-dialog.c
index edcd1b474..c87ca0bf0 100644
--- a/src/prefs-dialog.c
+++ b/src/prefs-dialog.c
@@ -568,6 +568,7 @@ static void
 sync_setup_firefox_iframe (PrefsDialog *dialog)
 {
   EphyEmbedShell *shell;
+  WebKitWebsiteDataManager *manager;
   WebKitWebContext *embed_context;
   WebKitWebContext *sync_context;
   const char *script;
@@ -610,7 +611,8 @@ sync_setup_firefox_iframe (PrefsDialog *dialog)
 
     shell = ephy_embed_shell_get_default ();
     embed_context = ephy_embed_shell_get_web_context (shell);
-    sync_context = webkit_web_context_new ();
+    manager = webkit_web_context_get_website_data_manager (embed_context);
+    sync_context = webkit_web_context_new_with_website_data_manager (manager);
     webkit_web_context_set_preferred_languages (sync_context,
                                                 g_object_get_data (G_OBJECT (embed_context), 
"preferred-languages"));
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]