Backout 9e11714fcba2 (bug 809094) for browser-chrome failures on a CLOSED TREE

This commit is contained in:
Ed Morley 2013-01-07 10:22:08 +00:00
Родитель 81a3985504
Коммит 7d5145ce2c
7 изменённых файлов: 65 добавлений и 339 удалений

Просмотреть файл

@ -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%/");

Просмотреть файл

@ -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

Просмотреть файл

@ -50,8 +50,6 @@
type="bool"/>
#endif
<!-- Data Choices tab -->
#ifdef MOZ_TELEMETRY_REPORTING
<preference id="toolkit.telemetry.enabled"
#ifdef MOZ_TELEMETRY_ON_BY_DEFAULT
@ -76,12 +74,12 @@
<!-- Network tab -->
<preference id="browser.cache.disk.capacity" name="browser.cache.disk.capacity" type="int"/>
<preference id="browser.offline-apps.notify" name="browser.offline-apps.notify" type="bool"/>
<preference id="browser.cache.disk.smart_size.enabled"
name="browser.cache.disk.smart_size.enabled"
inverted="true"
type="bool"/>
<!-- Update tab -->
#ifdef MOZ_UPDATER
<preference id="app.update.enabled" name="app.update.enabled" type="bool"/>
@ -117,7 +115,7 @@
name="security.disable_button.openDeviceManager"
type="bool"/>
</preferences>
#ifdef HAVE_SHELL_SERVICE
<stringbundle id="bundleShell" src="chrome://browser/locale/shellservice.properties"/>
<stringbundle id="bundleBrand" src="chrome://branding/locale/brand.properties"/>
@ -130,7 +128,6 @@
<tabs id="tabsElement">
<tab id="generalTab" label="&generalTab.label;" helpTopic="prefs-advanced-general"/>
<tab id="dataChoicesTab" label="&dataChoicesTab.label;" helpTopic="prefs-advanced-data-choices"/>
<tab id="networkTab" label="&networkTab.label;" helpTopic="prefs-advanced-network"/>
<tab id="updateTab" label="&updateTab.label;" helpTopic="prefs-advanced-update"/>
<tab id="encryptionTab" label="&encryptionTab.label;" helpTopic="prefs-advanced-encryption"/>
@ -183,11 +180,11 @@
preference="layout.spellcheckDefault"/>
</groupbox>
#ifdef HAVE_SHELL_SERVICE
<!-- System Defaults -->
<groupbox id="systemDefaultsGroup" orient="vertical">
<caption label="&systemDefaults.label;"/>
#ifdef HAVE_SHELL_SERVICE
<checkbox id="alwaysCheckDefault" preference="browser.shell.checkDefaultBrowser"
label="&alwaysCheckDefault.label;" accesskey="&alwaysCheckDefault.accesskey;"
flex="1"/>
@ -200,71 +197,20 @@
<description>&isDefault.label;</description>
</deck>
</hbox>
</groupbox>
#endif
</tabpanel>
#ifndef MOZ_TELEMETRY_REPORTING
#ifndef MOZ_SERVICES_HEALTHREPORT
#ifndef MOZ_CRASHREPORTER
#define HIDE_DATACHOICES
#endif
#endif
#endif
#ifndef HIDE_DATACHOICES
<!-- Data Choices -->
<tabpanel id="dataChoicesPanel" orient="vertical">
#ifdef MOZ_TELEMETRY_REPORTING
<groupbox>
<caption label="&telemetrySection.label;"/>
<description>&telemetryDesc.label;</description>
<hbox>
<checkbox id="submitTelemetryBox"
preference="toolkit.telemetry.enabled"
label="&enableTelemetry.label;"
accesskey="&enableTelemetry.accesskey;"/>
<spacer flex="1"/>
<label id="telemetryLearnMore"
class="text-link"
value="&telemetryLearnMore.label;"/>
</hbox>
</groupbox>
#endif
#ifdef MOZ_SERVICES_HEALTHREPORT
<groupbox>
<caption label="&FHRSection.label;"/>
<description>&FHRDesc.label;</description>
<hbox>
<checkbox id="submitHealthReportBox"
oncommand="gAdvancedPane.updateSubmitHealthReport();"
label="&enableFHR.label;"
accesskey="&enableFHR.accesskey;"/>
<spacer flex="1"/>
<label id="FHRLearnMore"
class="text-link"
value="&FHRLearnMore.label;"/>
</hbox>
</groupbox>
#endif
#ifdef MOZ_CRASHREPORTER
<groupbox>
<caption label="&crashReporterSection.label;"/>
<description>&crashReporterDesc.label;</description>
<hbox>
<checkbox id="submitCrashesBox"
oncommand="gAdvancedPane.updateSubmitCrashes();"
label="&enableCrashReporter.label;"
accesskey="&enableCrashReporter.accesskey;"/>
<spacer flex="1"/>
<label id="crashReporterLearnMore"
class="text-link"
value="&crashReporterLearnMore.label;"/>
</hbox>
<checkbox id="submitCrashesBox" flex="1"
oncommand="gAdvancedPane.updateSubmitCrashes();"
label="&submitCrashes.label;" accesskey="&submitCrashes.accesskey;"/>
#endif
#endif
#ifdef MOZ_TELEMETRY_REPORTING
<checkbox id="submitTelemetryBox" flex="1"
preference="toolkit.telemetry.enabled"
label="&submitTelemetry.label;" accesskey="&submitTelemetry.accesskey;"/>
#endif
</groupbox>
#endif
</tabpanel>
#endif
<!-- Network -->
<tabpanel id="networkPanel" orient="vertical">
@ -293,11 +239,11 @@
<checkbox preference="browser.cache.disk.smart_size.enabled"
id="allowSmartSize" flex="1"
onsyncfrompreference="return gAdvancedPane.readSmartSizeEnabled();"
label="&overrideSmartCacheSize.label;"
label="&overrideSmartCacheSize.label;"
accesskey="&overrideSmartCacheSize.accesskey;"/>
<hbox align="center" class="indent">
<label id="useCacheBefore" control="cacheSize"
accesskey="&limitCacheSizeBefore.accesskey;"
accesskey="&limitCacheSizeBefore.accesskey;"
value="&limitCacheSizeBefore.label;"/>
<textbox id="cacheSize" type="number" size="4" max="1024"
preference="browser.cache.disk.capacity"
@ -342,7 +288,7 @@
<button id="offlineAppsListRemove"
disabled="true"
label="&offlineAppsListRemove.label;"
accesskey="&offlineAppsListRemove.accesskey;"
accesskey="&offlineAppsListRemove.accesskey;"
oncommand="gAdvancedPane.removeOfflineApp();"/>
</vbox>
</hbox>
@ -443,9 +389,9 @@
<radiogroup id="certSelection" orient="horizontal" preftype="string"
preference="security.default_personal_cert"
aria-labelledby="CertGroupCaption CertSelectionDesc">
<radio label="&certs.auto;" accesskey="&certs.auto.accesskey;"
<radio label="&certs.auto;" accesskey="&certs.auto.accesskey;"
value="Select Automatically"/>
<radio label="&certs.ask;" accesskey="&certs.ask.accesskey;"
<radio label="&certs.ask;" accesskey="&certs.ask.accesskey;"
value="Ask Every Time"/>
</radiogroup>
@ -456,15 +402,15 @@
#endif
<hbox>
<button id="viewCertificatesButton"
label="&viewCerts.label;" accesskey="&viewCerts.accesskey;"
label="&viewCerts.label;" accesskey="&viewCerts.accesskey;"
oncommand="gAdvancedPane.showCertificates();"
preference="security.disable_button.openCertManager"/>
<button id="viewCRLButton"
label="&viewCRLs.label;" accesskey="&viewCRLs.accesskey;"
label="&viewCRLs.label;" accesskey="&viewCRLs.accesskey;"
oncommand="gAdvancedPane.showCRLs();"
preference="security.OCSP.disable_button.managecrl"/>
<button id="verificationButton"
label="&verify2.label;" accesskey="&verify2.accesskey;"
label="&verify2.label;" accesskey="&verify2.accesskey;"
oncommand="gAdvancedPane.showOCSP();"/>
#ifdef XP_MACOSX
</hbox>

Просмотреть файл

@ -39,9 +39,8 @@ 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");
@ -118,43 +117,11 @@ 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");
},
/**
*
*/
initSubmitCrashes: function ()
{
this._setupLearnMoreLink("toolkit.crashreporter.infoURL",
"crashReporterLearnMore");
var checkbox = document.getElementById("submitCrashesBox");
try {
var cr = Components.classes["@mozilla.org/toolkit/crash-reporter;1"].
@ -178,18 +145,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;
@ -199,10 +164,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
@ -216,56 +179,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

Просмотреть файл

@ -152,7 +152,6 @@
<tabs id="tabsElement">
<tab id="generalTab" label="&generalTab.label;" helpTopic="prefs-advanced-general"/>
<tab id="dataChoicesTab" label="&dataChoicesTab.label;" helpTopic="prefs-advanced-data-choices"/>
<tab id="networkTab" label="&networkTab.label;" helpTopic="prefs-advanced-network"/>
<tab id="updateTab" label="&updateTab.label;" helpTopic="prefs-advanced-update"/>
<tab id="encryptionTab" label="&encryptionTab.label;" helpTopic="prefs-advanced-encryption"/>
@ -202,14 +201,14 @@
onsynctopreference="return gAdvancedPane.writeCheckSpelling();"
preference="layout.spellcheckDefault"/>
</groupbox>
#ifdef HAVE_SHELL_SERVICE
<!-- System Defaults -->
<groupbox id="systemDefaultsGroup" orient="vertical">
<caption label="&systemDefaults.label;"/>
#ifdef HAVE_SHELL_SERVICE
<checkbox id="alwaysCheckDefault" preference="browser.shell.checkDefaultBrowser"
label="&alwaysCheckDefault.label;" accesskey="&alwaysCheckDefault.accesskey;"
flex="1"/>
label="&alwaysCheckDefault.label;" accesskey="&alwaysCheckDefault.accesskey;"
flex="1"/>
<hbox class="indent">
<deck id="setDefaultPane">
<button id="setDefaultButton"
@ -219,70 +218,19 @@
<description>&isDefault.label;</description>
</deck>
</hbox>
</groupbox>
#endif
</tabpanel>
#ifndef MOZ_TELEMETRY_REPORTING
#ifndef MOZ_SERVICES_HEALTHREPORT
#ifndef MOZ_CRASHREPORTER
#define HIDE_DATACHOICES
#endif
#endif
#endif
#ifndef HIDE_DATACHOICES
<!-- Data Choices -->
<tabpanel id="dataChoicesPanel" orient="vertical">
#ifdef MOZ_TELEMETRY_REPORTING
<groupbox>
<caption label="&telemetrySection.label;"/>
<description>&telemetryDesc.label;</description>
<hbox>
<checkbox id="submitTelemetryBox"
preference="toolkit.telemetry.enabled"
label="&enableTelemetry.label;"
accesskey="&enableTelemetry.accesskey;"/>
<spacer flex="1"/>
<label id="telemetryLearnMore"
class="text-link"
value="&telemetryLearnMore.label;"/>
</hbox>
</groupbox>
#endif
#ifdef MOZ_SERVICES_HEALTHREPORT
<groupbox>
<caption label="&FHRSection.label;"/>
<description>&FHRDesc.label;</description>
<hbox>
<checkbox id="submitHealthReportBox"
oncommand="gAdvancedPane.updateSubmitHealthReport();"
label="&enableFHR.label;"
accesskey="&enableFHR.accesskey;"/>
<spacer flex="1"/>
<label id="FHRLearnMore"
class="text-link"
value="&FHRLearnMore.label;"/>
</hbox>
</groupbox>
#endif
#ifdef MOZ_CRASHREPORTER
<groupbox>
<caption label="&crashReporterSection.label;"/>
<description>&crashReporterDesc.label;</description>
<hbox>
<checkbox id="submitCrashesBox"
oncommand="gAdvancedPane.updateSubmitCrashes();"
label="&enableCrashReporter.label;"
accesskey="&enableCrashReporter.accesskey;"/>
<spacer flex="1"/>
<label id="crashReporterLearnMore"
class="text-link"
value="&crashReporterLearnMore.label;"/>
</hbox>
<checkbox id="submitCrashesBox" flex="1"
oncommand="gAdvancedPane.updateSubmitCrashes();"
label="&submitCrashes.label;" accesskey="&submitCrashes.accesskey;"/>
#endif
#endif
#ifdef MOZ_TELEMETRY_REPORTING
<checkbox id="submitTelemetryBox" flex="1"
preference="toolkit.telemetry.enabled"
label="&submitTelemetry.label;" accesskey="&submitTelemetry.accesskey;"/>
#endif
</groupbox>
#endif
</tabpanel>
#endif
<!-- Network -->
<tabpanel id="networkPanel" orient="vertical">

Просмотреть файл

@ -32,26 +32,10 @@
<!ENTITY setDefault.label "Make &brandShortName; the default browser">
<!ENTITY setDefault.accesskey "d">
<!ENTITY isDefault.label "&brandShortName; is currently your default browser">
<!ENTITY dataChoicesTab.label "Data Choices">
<!ENTITY FHRSection.label "Firefox Health Report">
<!ENTITY FHRDesc.label "Helps you understand your browser performance and shares data with &vendorShortName; about your browser health">
<!ENTITY enableFHR.label "Enable Firefox Health Report">
<!ENTITY enableFHR.accesskey "F">
<!ENTITY FHRLearnMore.label "Learn More">
<!ENTITY telemetrySection.label "Telemetry">
<!ENTITY telemetryDesc.label "Shares performance, usage, hardware and customization data about your browser with &vendorShortName; to help us make &brandShortName; better">
<!ENTITY enableTelemetry.label "Enable Telemetry">
<!ENTITY enableTelemetry.accesskey "T">
<!ENTITY telemetryLearnMore.label "Learn More">
<!ENTITY crashReporterSection.label "Crash Reporter">
<!ENTITY crashReporterDesc.label "&brandShortName; submits crash reports to help &vendorShortName; make your browser more stable and secure">
<!ENTITY enableCrashReporter.label "Enable Crash Reporter">
<!ENTITY enableCrashReporter.accesskey "C">
<!ENTITY crashReporterLearnMore.label "Learn More">
<!ENTITY submitCrashes.label "Submit crash reports">
<!ENTITY submitCrashes.accesskey "S">
<!ENTITY submitTelemetry.label "Submit performance data">
<!ENTITY submitTelemetry.accesskey "P">
<!ENTITY networkTab.label "Network">

Просмотреть файл

@ -21,4 +21,4 @@ pref("healthreport.policy.nextDataSubmissionTime", "0");
pref("healthreport.service.enabled", true);
pref("healthreport.service.loadDelayMsec", 10000);
pref("healthreport.service.providerCategories", "healthreport-js-provider");
pref("healthreport.infoURL", "http://www.mozilla.org/legal/privacy/firefox.html#health-report");