зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1530789 - [2.0] Initialize the SafeBrowsing module only in the parent process. r=dimi
Differential Revision: https://phabricator.services.mozilla.com/D21422 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
d94b0ddbac
Коммит
2276021d2f
|
@ -12,6 +12,7 @@ XPCOMUtils.defineLazyModuleGetters(this, {
|
|||
GeckoViewTelemetryController: "resource://gre/modules/GeckoViewTelemetryController.jsm",
|
||||
L10nRegistry: "resource://gre/modules/L10nRegistry.jsm",
|
||||
Preferences: "resource://gre/modules/Preferences.jsm",
|
||||
SafeBrowsing: "resource://gre/modules/SafeBrowsing.jsm",
|
||||
Services: "resource://gre/modules/Services.jsm",
|
||||
});
|
||||
|
||||
|
@ -125,6 +126,10 @@ GeckoViewStartup.prototype = {
|
|||
|
||||
ChromeUtils.import("resource://gre/modules/NotificationDB.jsm");
|
||||
|
||||
// Initialize safe browsing module. This is required for content
|
||||
// blocking features and manages blocklist downloads and updates.
|
||||
SafeBrowsing.init();
|
||||
|
||||
// Listen for global EventDispatcher messages
|
||||
EventDispatcher.instance.registerListener(this,
|
||||
["GeckoView:ResetUserPrefs",
|
||||
|
|
|
@ -9,10 +9,6 @@ var EXPORTED_SYMBOLS = ["GeckoViewSettings"];
|
|||
const {GeckoViewModule} = ChromeUtils.import("resource://gre/modules/GeckoViewModule.jsm");
|
||||
const {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(this, {
|
||||
SafeBrowsing: "resource://gre/modules/SafeBrowsing.jsm",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(
|
||||
this, "MOBILE_USER_AGENT",
|
||||
function() {
|
||||
|
@ -45,11 +41,9 @@ const USER_AGENT_MODE_VR = 2;
|
|||
class GeckoViewSettings extends GeckoViewModule {
|
||||
onInit() {
|
||||
debug `onInit`;
|
||||
this._useTrackingProtection = false;
|
||||
this._userAgentMode = USER_AGENT_MODE_MOBILE;
|
||||
this._userAgentOverride = null;
|
||||
// Required for safe browsing and tracking protection.
|
||||
SafeBrowsing.init();
|
||||
|
||||
this.registerListener([
|
||||
"GeckoView:GetUserAgent",
|
||||
|
|
Загрузка…
Ссылка в новой задаче