From 78cf89c5caa94be7c7316facda4fa9cf74da8c0c Mon Sep 17 00:00:00 2001 From: Ed Morley Date: Mon, 7 Jan 2013 10:22:08 +0000 Subject: [PATCH] Backout 9e11714fcba2 (bug 809094) for browser-chrome failures on a CLOSED TREE --- browser/app/profile/firefox.js | 4 - browser/components/preferences/advanced.js | 97 +++-------------- browser/components/preferences/advanced.xul | 100 ++++-------------- .../preferences/in-content/advanced.js | 99 +++-------------- .../preferences/in-content/advanced.xul | 78 +++----------- .../chrome/browser/preferences/advanced.dtd | 24 +---- services/healthreport/healthreport-prefs.js | 2 +- 7 files changed, 65 insertions(+), 339 deletions(-) diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js index 2606af4a99f..e2954eeb440 100644 --- a/browser/app/profile/firefox.js +++ b/browser/app/profile/firefox.js @@ -857,10 +857,6 @@ pref("breakpad.reportURL", "http://crash-stats.mozilla.com/report/index/"); pref("toolkit.crashreporter.pluginHangSubmitURL", "https://hang-reports.mozilla.org/submit"); -// URL for "Learn More" for Crash Reporter -pref("toolkit.crashreporter.infoURL", - "http://www.mozilla.com/legal/privacy/firefox.html#crash-reporter"); - // base URL for web-based support pages pref("app.support.baseURL", "http://support.mozilla.org/1/firefox/%VERSION%/%OS%/%LOCALE%/"); diff --git a/browser/components/preferences/advanced.js b/browser/components/preferences/advanced.js index 7f884e1dd90..01600da210d 100644 --- a/browser/components/preferences/advanced.js +++ b/browser/components/preferences/advanced.js @@ -48,11 +48,9 @@ var gAdvancedPane = { #ifdef MOZ_CRASHREPORTER this.initSubmitCrashes(); #endif +#ifdef MOZ_TELEMETRY_ON_BY_DEFAULT this.initTelemetry(); -#ifdef MOZ_SERVICES_HEALTHREPORT - this.initSubmitHealthReport(); #endif - this.updateActualCacheSize("disk"); this.updateActualCacheSize("offline"); @@ -131,34 +129,6 @@ var gAdvancedPane = { return checkbox.checked ? (this._storedSpellCheck == 2 ? 2 : 1) : 0; }, - /** - * When the user toggles the layers.acceleration.disabled pref, - * sync its new value to the gfx.direct2d.disabled pref too. - */ - updateHardwareAcceleration: function() - { -#ifdef XP_WIN - var fromPref = document.getElementById("layers.acceleration.disabled"); - var toPref = document.getElementById("gfx.direct2d.disabled"); - toPref.value = fromPref.value; -#endif - }, - - // DATA CHOICES TAB - - /** - * Set up or hide the Learn More links for various data collection options - */ - _setupLearnMoreLink: function(pref, element) { - // set up the Learn More link with the correct URL - let url = Services.prefs.getCharPref(pref); - let el = document.getElementById(element); - if (url) - el.setAttribute("href", url); - else - el.setAttribute("hidden", "true"); - }, - /** * */ @@ -172,7 +142,6 @@ var gAdvancedPane = { } catch (e) { checkbox.style.display = "none"; } - this._setupLearnMoreLink("toolkit.crashreporter.infoURL", "crashReporterLearnMore"); }, /** @@ -188,19 +157,16 @@ var gAdvancedPane = { } catch (e) { } }, - +#ifdef MOZ_TELEMETRY_ON_BY_DEFAULT /** * When telemetry is opt-out, verify if the user explicitly rejected the * telemetry prompt, and if so reflect his choice in the current preference * value. This doesn't cover the case where the user refused telemetry in the * prompt but later enabled it in preferences in builds before the fix for * bug 737600. - * - * In all cases, set up the Learn More link sanely */ initTelemetry: function () { -#ifdef MOZ_TELEMETRY_ON_BY_DEFAULT const PREF_TELEMETRY_ENABLED = "toolkit.telemetry.enabledPreRelease"; let enabled = Services.prefs.getBoolPref(PREF_TELEMETRY_ENABLED); let rejected = false; @@ -210,9 +176,8 @@ var gAdvancedPane = { if (enabled && rejected) { Services.prefs.setBoolPref(PREF_TELEMETRY_ENABLED, false); } -#endif - this._setupLearnMoreLink("toolkit.telemetry.infoURL", "telemetryLearnMore"); }, +#endif /** * When the user toggles telemetry, update the rejected value as well, so we @@ -226,56 +191,18 @@ var gAdvancedPane = { displayed.value = @MOZ_TELEMETRY_DISPLAY_REV@; }, -#ifdef MOZ_SERVICES_HEALTHREPORT /** - * Initialize the health report service reference and checkbox. + * When the user toggles the layers.acceleration.disabled pref, + * sync its new value to the gfx.direct2d.disabled pref too. */ - initSubmitHealthReport: function () { - this._setupLearnMoreLink("healthreport.infoURL", "FHRLearnMore"); - - let reporter = Components.classes["@mozilla.org/healthreport/service;1"] - .getService(Components.interfaces.nsISupports) - .wrappedJSObject - .reporter; - - let checkbox = document.getElementById("submitHealthReportBox"); - - if (!reporter) { - checkbox.setAttribute("disabled", "true"); - return; - } - - checkbox.checked = reporter.dataSubmissionPolicyAccepted; - }, - - /** - * Update the health report policy acceptance with state from checkbox. - */ - updateSubmitHealthReport: function () { - let reporter = Components.classes["@mozilla.org/healthreport/service;1"] - .getService(Components.interfaces.nsISupports) - .wrappedJSObject - .reporter; - - if (!reporter) { - return; - } - - let checkbox = document.getElementById("submitHealthReportBox"); - - let accepted = reporter.dataSubmissionPolicyAccepted; - - if (checkbox.checked && !accepted) { - reporter.recordPolicyAcceptance("pref-checkbox-checked"); - return; - } - - if (!checkbox.checked && accepted) { - reporter.recordPolicyRejection("pref-checkbox-unchecked"); - return; - } - }, + updateHardwareAcceleration: function() + { +#ifdef XP_WIN + var fromPref = document.getElementById("layers.acceleration.disabled"); + var toPref = document.getElementById("gfx.direct2d.disabled"); + toPref.value = fromPref.value; #endif + }, // NETWORK TAB diff --git a/browser/components/preferences/advanced.xul b/browser/components/preferences/advanced.xul index bf00de5a913..a53d2cd86b9 100644 --- a/browser/components/preferences/advanced.xul +++ b/browser/components/preferences/advanced.xul @@ -50,8 +50,6 @@ type="bool"/> #endif - - #ifdef MOZ_TELEMETRY_REPORTING - + - + #ifdef MOZ_UPDATER @@ -117,7 +115,7 @@ name="security.disable_button.openDeviceManager" type="bool"/> - + #ifdef HAVE_SHELL_SERVICE @@ -130,7 +128,6 @@ - @@ -183,11 +180,11 @@ preference="layout.spellcheckDefault"/> -#ifdef HAVE_SHELL_SERVICE +#ifdef HAVE_SHELL_SERVICE @@ -200,71 +197,20 @@ &isDefault.label; - -#endif - - -#ifndef MOZ_TELEMETRY_REPORTING -#ifndef MOZ_SERVICES_HEALTHREPORT -#ifndef MOZ_CRASHREPORTER -#define HIDE_DATACHOICES -#endif -#endif -#endif -#ifndef HIDE_DATACHOICES - - -#ifdef MOZ_TELEMETRY_REPORTING - - - &telemetryDesc.label; - - - - - -#endif -#ifdef MOZ_SERVICES_HEALTHREPORT - - - &FHRDesc.label; - - - - - -#endif #ifdef MOZ_CRASHREPORTER - - - &crashReporterDesc.label; - - - - - + +#endif +#endif +#ifdef MOZ_TELEMETRY_REPORTING + +#endif -#endif -#endif + @@ -293,11 +239,11 @@ @@ -443,9 +389,9 @@ - - @@ -456,15 +402,15 @@ #endif