Bug 1431942 - Refactor privacy.js initialization code to account for MOZ_DATA_REPORTING being false. r=jaws
authorpubkeypin <pubkeypin@web.de>
Sat, 20 Jan 2018 18:43:56 +0100
changeset 400808 87fed30c57597ade9c70b3509c41fcc26f54b6e1
parent 400807 4f292fa4e4a30c8ba0745cf9884dc08c098752c0
child 400809 541ea4baacba3609fc237a6bca6dd4cfcbad6fbf
push id33319
push useraiakab@mozilla.com
push dateFri, 26 Jan 2018 00:22:49 +0000
treeherdermozilla-central@b5b38db26ed7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjaws
bugs1431942
milestone60.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1431942 - Refactor privacy.js initialization code to account for MOZ_DATA_REPORTING being false. r=jaws
browser/components/preferences/in-content/privacy.js
--- a/browser/components/preferences/in-content/privacy.js
+++ b/browser/components/preferences/in-content/privacy.js
@@ -402,23 +402,25 @@ var gPrivacyPane = {
       emeUIEnabled = emeUIEnabled && parseFloat(Services.sysinfo.get("version")) >= 6;
     }
     if (!emeUIEnabled) {
       // Don't want to rely on .hidden for the toplevel groupbox because
       // of the pane hiding/showing code potentially interfering:
       document.getElementById("drmGroup").setAttribute("style", "display: none !important");
     }
 
-    this.initDataCollection();
-    if (AppConstants.MOZ_CRASHREPORTER) {
-      this.initSubmitCrashes();
+    if (AppConstants.MOZ_DATA_REPORTING) {
+      this.initDataCollection();
+      if (AppConstants.MOZ_CRASHREPORTER) {
+        this.initSubmitCrashes();
+      }
+      this.initSubmitHealthReport();
+      setEventListener("submitHealthReportBox", "command",
+        gPrivacyPane.updateSubmitHealthReport);
     }
-    this.initSubmitHealthReport();
-    setEventListener("submitHealthReportBox", "command",
-      gPrivacyPane.updateSubmitHealthReport);
     this._initA11yState();
     let signonBundle = document.getElementById("signonBundle");
     let pkiBundle = document.getElementById("pkiBundle");
     appendSearchKeywords("passwordExceptions", [
       bundlePrefs.getString("savedLoginsExceptions_title"),
       bundlePrefs.getString("savedLoginsExceptions_desc3"),
     ]);
     appendSearchKeywords("showPasswords", [