From 92681d5884c16452c3b4a25cb05b77e9f58b4cf7 Mon Sep 17 00:00:00 2001 From: Robert Helmer Date: Sat, 20 Apr 2019 05:10:23 +0000 Subject: [PATCH] Bug 1515712 - add default pref and start corroborator if enabled r=kmag Depends on D15123 Differential Revision: https://phabricator.services.mozilla.com/D28250 --HG-- extra : moz-landing-system : lando --- browser/app/profile/firefox.js | 7 +++++++ browser/components/BrowserGlue.jsm | 5 +++++ 2 files changed, 12 insertions(+) diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js index 4be14e5094c8..116086538d79 100644 --- a/browser/app/profile/firefox.js +++ b/browser/app/profile/firefox.js @@ -1879,3 +1879,10 @@ pref("browser.toolbars.keyboard_navigation", true); // quick access to sign-in and manage your Firefox Account. pref("identity.fxaccounts.toolbar.enabled", true); pref("identity.fxaccounts.toolbar.accessed", false); + +// Check bundled JAR and XPI files for corruption. +#ifdef RELEASE_OR_BETA +pref("corroborator.enabled", false); +#else +pref("corroborator.enabled", true); +#endif diff --git a/browser/components/BrowserGlue.jsm b/browser/components/BrowserGlue.jsm index 57cc0d09fade..0e2714ede15b 100644 --- a/browser/components/BrowserGlue.jsm +++ b/browser/components/BrowserGlue.jsm @@ -391,6 +391,7 @@ XPCOMUtils.defineLazyModuleGetters(this, { BrowserUsageTelemetry: "resource:///modules/BrowserUsageTelemetry.jsm", BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.jsm", ContextualIdentityService: "resource://gre/modules/ContextualIdentityService.jsm", + Corroborate: "resource://gre/modules/Corroborate.jsm", DateTimePickerParent: "resource://gre/modules/DateTimePickerParent.jsm", Discovery: "resource:///modules/Discovery.jsm", ExtensionsUI: "resource:///modules/ExtensionsUI.jsm", @@ -1574,6 +1575,10 @@ BrowserGlue.prototype = { this._monitorScreenshotsPref(); this._monitorWebcompatReporterPref(); + if (Services.prefs.getBoolPref("corroborator.enabled", true)) { + Corroborate.init().catch(Cu.reportError); + } + let pService = Cc["@mozilla.org/toolkit/profile-service;1"]. getService(Ci.nsIToolkitProfileService); if (pService.createdAlternateProfile) {