Codebase list epiphany-browser / fac4f18
Move gsb data to meson_options.txt Move gsb_api_key to meson_options.txt so we can provide the necessary support within flatpak, but can disable it for the rest. Fixes: https://gitlab.gnome.org/GNOME/epiphany/-/issues/682 Jan-Michael Brummer 3 years ago
5 changed file(s) with 15 addition(s) and 10 deletion(s). Raw diff Collapse all Expand all
185185 <summary>Enable safe browsing</summary>
186186 <description>Whether to enable safe browsing. Safe browsing operates via Google Safe Browsing API v4.</description>
187187 </key>
188 <key type="s" name="gsb-api-key">
189 <default>'AIzaSyAtuURrRblYXvwCyDC5ZFq0mEw1x4VN6KA'</default>
190 <summary>Google Safe Browsing API key</summary>
191 <description>The API key used to access the Google Safe Browsing API v4.</description>
192 </key>
193188 <key type="b" name="enable-itp">
194189 <default>true</default>
195190 <summary>Enable Intelligent Tracking Prevention (ITP)</summary>
637637 g_assert (EPHY_IS_EMBED_SHELL (shell));
638638
639639 if (!priv->global_gsb_service) {
640 g_autofree char *api_key = NULL;
641640 g_autofree char *db_path = NULL;
642641
643 api_key = g_settings_get_string (EPHY_SETTINGS_WEB, EPHY_PREFS_WEB_GSB_API_KEY);
644642 db_path = g_build_filename (ephy_default_cache_dir (), EPHY_GSB_FILE, NULL);
645 priv->global_gsb_service = ephy_gsb_service_new (api_key, db_path);
643 priv->global_gsb_service = ephy_gsb_service_new (GSB_API_KEY, db_path);
646644 }
647645
648646 return priv->global_gsb_service;
106106 #define EPHY_PREFS_WEB_REMEMBER_PASSWORDS "remember-passwords"
107107 #define EPHY_PREFS_WEB_ENABLE_SITE_SPECIFIC_QUIRKS "enable-site-specific-quirks"
108108 #define EPHY_PREFS_WEB_ENABLE_SAFE_BROWSING "enable-safe-browsing"
109 #define EPHY_PREFS_WEB_GSB_API_KEY "gsb-api-key"
110109 #define EPHY_PREFS_WEB_ENABLE_ITP "enable-itp"
111110 #define EPHY_PREFS_WEB_ENABLE_WEBSITE_DATA_STORAGE "enable-website-data-storage"
112111 #define EPHY_PREFS_WEB_DEFAULT_ZOOM_LEVEL "default-zoom-level"
136135 EPHY_PREFS_WEB_REMEMBER_PASSWORDS,
137136 EPHY_PREFS_WEB_ENABLE_SITE_SPECIFIC_QUIRKS,
138137 EPHY_PREFS_WEB_ENABLE_SAFE_BROWSING,
139 EPHY_PREFS_WEB_GSB_API_KEY,
140138 EPHY_PREFS_WEB_ENABLE_ITP,
141139 EPHY_PREFS_WEB_ENABLE_WEBSITE_DATA_STORAGE,
142140 EPHY_PREFS_WEB_DEFAULT_ZOOM_LEVEL,
6666
6767 conf.set_quoted('VERSION', '@VCS_TAG@')
6868
69 gsb_api_key = get_option('gsb_api_key')
70 conf.set_quoted('GSB_API_KEY', gsb_api_key)
71 if gsb_api_key != ''
72 message('GSB API Key provided')
73 endif
74
6975 config_h = declare_dependency(
7076 sources: vcs_tag(
7177 input: configure_file(
127133 subdir('tests')
128134
129135 meson.add_install_script('post_install.py')
136
2626 value: 'enabled',
2727 description: 'Enable unit tests'
2828 )
29
30 option('gsb_api_key',
31 type: 'string',
32 value: '',
33 description: 'The API key used to access the Google Safe Browsing API v4'
34 )
35