Commit d8e06867 authored by Alex Catarineu's avatar Alex Catarineu
Browse files

Bug 40007: Move SecurityPrefs initialization to the StartupObserver component.

With this change this will be properly initialized both in desktop and mobile,
and we will not need additional tor-browser changes to load torbutton.js
for GeckoView.
parent 72cbb6d5
......@@ -28,7 +28,6 @@ let {
torbutton_log,
torbutton_get_property_string,
} = ChromeUtils.import("resource://torbutton/modules/utils.js", {});
let SecurityPrefs = ChromeUtils.import("resource://torbutton/modules/security-prefs.js", {});
let { configureControlPortModule } = Cu.import("resource://torbutton/modules/tor-control-port.js", {});
const k_tb_last_browser_version_pref = "extensions.torbutton.lastBrowserVersion";
......@@ -238,8 +237,6 @@ function torbutton_is_mobile() {
torbutton_init = function() {
torbutton_log(3, 'called init()');
SecurityPrefs.initialize();
if (m_tb_wasinited) {
return;
}
......
......@@ -26,6 +26,7 @@ XPCOMUtils.defineLazyModuleGetters(this, {
});
let NoScriptControl = ChromeUtils.import("resource://torbutton/modules/noscript-control.js", {});
let SecurityPrefs = ChromeUtils.import("resource://torbutton/modules/security-prefs.js", {});
// Module specific constants
const kMODULE_NAME = "Startup";
......@@ -192,9 +193,11 @@ StartupObserver.prototype = {
// but only for hackish reasons.
this._prefs.setBoolPref("extensions.torbutton.startup", true);
// We need to listen for NoScript before it starts.
// We need to listen for NoScript before it starts.
NoScriptControl.initialize();
SecurityPrefs.initialize();
this.setProxySettings();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment