[epiphany] uri-tester: Do not update HTTPS Everywhere rulesets in test mode



commit a55ea074075cca929cdbe3c84350c55eb1c4ab57
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Tue Oct 25 18:17:22 2016 -0500

    uri-tester: Do not update HTTPS Everywhere rulesets in test mode
    
    Nor in search provider mode

 embed/ephy-uri-tester.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/embed/ephy-uri-tester.c b/embed/ephy-uri-tester.c
index 4de983e..c05cd7e 100644
--- a/embed/ephy-uri-tester.c
+++ b/embed/ephy-uri-tester.c
@@ -29,6 +29,7 @@
 
 #include "ephy-dbus-names.h"
 #include "ephy-debug.h"
+#include "ephy-embed-shell.h"
 #include "ephy-file-helpers.h"
 #include "ephy-settings.h"
 #include "ephy-uri-helpers.h"
@@ -999,6 +1000,14 @@ static void
 ephy_uri_tester_update_https_everywhere_rulesets (EphyUriTester *tester)
 {
   HTTPSEverywhereUpdater *updater;
+  EphyEmbedShell *shell;
+  EphyEmbedShellMode mode;
+
+  shell = ephy_embed_shell_get_default ();
+  mode = ephy_embed_shell_get_mode (shell);
+
+  if (mode == EPHY_EMBED_SHELL_MODE_TEST || mode == EPHY_EMBED_SHELL_MODE_SEARCH_PROVIDER)
+    return;
 
   /* We might want to be smarter about this in the future. For now,
    * trigger an update of the rulesets once each time an EphyUriTester


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