summaryrefslogtreecommitdiff
path: root/embed/ephy-embed-shell.c
diff options
context:
space:
mode:
authorGabriel Ivascu <gabrielivascu@gnome.org>2017-09-08 17:38:56 +0300
committerGabriel Ivascu <gabrielivascu@gnome.org>2017-10-03 18:29:53 +0200
commitdb785bb030e801d2716a306179f74c75c3003d52 (patch)
tree4f79cf18765df6fe36c871788a6201c30f418459 /embed/ephy-embed-shell.c
parent598f7e039ad4ed8f64591596c29436f800b146fd (diff)
downloadepiphany-db785bb030e801d2716a306179f74c75c3003d52.tar.gz
safe-browsing: Add stub service and storage objects
Diffstat (limited to 'embed/ephy-embed-shell.c')
-rw-r--r--embed/ephy-embed-shell.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/embed/ephy-embed-shell.c b/embed/ephy-embed-shell.c
index 29f8f1bfd..47541ded2 100644
--- a/embed/ephy-embed-shell.c
+++ b/embed/ephy-embed-shell.c
@@ -57,6 +57,7 @@
typedef struct {
WebKitWebContext *web_context;
EphyHistoryService *global_history_service;
+ EphyGSBService *global_gsb_service;
EphyEncodings *encodings;
GtkPageSetup *page_setup;
GtkPrintSettings *print_settings;
@@ -168,6 +169,7 @@ ephy_embed_shell_dispose (GObject *object)
g_clear_object (&priv->page_setup);
g_clear_object (&priv->print_settings);
g_clear_object (&priv->global_history_service);
+ g_clear_object (&priv->global_gsb_service);
g_clear_object (&priv->about_handler);
g_clear_object (&priv->user_content);
g_clear_object (&priv->downloads_manager);
@@ -575,6 +577,31 @@ ephy_embed_shell_get_global_history_service (EphyEmbedShell *shell)
return priv->global_history_service;
}
+/**
+ * ephy_embed_shell_get_global_gsb_service:
+ * @shell: the #EphyEmbedShell
+ *
+ * Return value: (transfer none): the global #EphyGSBService
+ **/
+EphyGSBService *
+ephy_embed_shell_get_global_gsb_service (EphyEmbedShell *shell)
+{
+ EphyEmbedShellPrivate *priv = ephy_embed_shell_get_instance_private (shell);
+
+ g_return_val_if_fail (EPHY_IS_EMBED_SHELL (shell), NULL);
+
+ if (priv->global_gsb_service == NULL) {
+ char *filename;
+
+ filename = g_build_filename (ephy_dot_dir (), EPHY_GSB_FILE, NULL);
+ priv->global_gsb_service = ephy_gsb_service_new (filename);
+
+ g_free (filename);
+ }
+
+ return priv->global_gsb_service;
+}
+
static void
snapshot_saved_cb (EphySnapshotService *service,
const char *url,