Bug 1287178 - Replace erroneous Enable Crash Reporter pref with one that lets users opt-in to sending backlogged reports. r=jaws

The "Enable Crash Reporter" pref is erroneous because what it actually controls is
whether or not the "Submit crash report" checkbox is checked by default when the
crash report dialog comes up.

MozReview-Commit-ID: Ud6SLKXvxw
This commit is contained in:
Mike Conley
2016-09-07 16:50:11 -04:00
parent b6bf29051b
commit ad8740c76f
4 changed files with 19 additions and 33 deletions

View File

@@ -1516,3 +1516,5 @@ pref("browser.crashReports.unsubmittedCheck.enabled", false);
#else
pref("browser.crashReports.unsubmittedCheck.enabled", true);
#endif
pref("browser.crashReports.unsubmittedCheck.autoSubmit", false);

View File

@@ -60,10 +60,7 @@ var gAdvancedPane = {
setEventListener("submitHealthReportBox", "command",
gAdvancedPane.updateSubmitHealthReport);
}
if (AppConstants.MOZ_CRASHREPORTER) {
setEventListener("submitCrashesBox", "command",
gAdvancedPane.updateSubmitCrashes);
}
setEventListener("connectionSettings", "command",
gAdvancedPane.showConnections);
setEventListener("clearCacheButton", "command",
@@ -243,28 +240,6 @@ var gAdvancedPane = {
{
this._setupLearnMoreLink("toolkit.crashreporter.infoURL",
"crashReporterLearnMore");
var checkbox = document.getElementById("submitCrashesBox");
try {
var cr = Components.classes["@mozilla.org/toolkit/crash-reporter;1"].
getService(Components.interfaces.nsICrashReporter);
checkbox.checked = cr.submitReports;
} catch (e) {
checkbox.style.display = "none";
}
},
/**
*
*/
updateSubmitCrashes: function ()
{
var checkbox = document.getElementById("submitCrashesBox");
try {
var cr = Components.classes["@mozilla.org/toolkit/crash-reporter;1"].
getService(Components.interfaces.nsICrashReporter);
cr.submitReports = checkbox.checked;
} catch (e) { }
},
/**

View File

@@ -54,6 +54,13 @@
type="bool"/>
#endif
<!-- Data Choices tab -->
#ifdef MOZ_CRASHREPORTER
<preference id="browser.crashReports.unsubmittedCheck.autoSubmit"
name="browser.crashReports.unsubmittedCheck.autoSubmit"
type="bool"/>
#endif
<!-- Network tab -->
<preference id="browser.cache.disk.capacity"
name="browser.cache.disk.capacity"
@@ -229,11 +236,13 @@
#ifdef MOZ_CRASHREPORTER
<groupbox>
<caption>
<checkbox id="submitCrashesBox" label="&enableCrashReporter.label;"
accesskey="&enableCrashReporter.accesskey;"/>
<checkbox id="automaticallySubmitCrashesBox"
preference="browser.crashReports.unsubmittedCheck.autoSubmit"
label="&alwaysSubmitCrashReports.label;"
accesskey="&alwaysSubmitCrashReports.accesskey;"/>
</caption>
<hbox class="indent">
<label flex="1">&crashReporterDesc.label;</label>
<label flex="1">&crashReporterDesc2.label;</label>
<spacer flex="10"/>
<label id="crashReporterLearnMore"
class="text-link">&crashReporterLearnMore.label;</label>

View File

@@ -40,10 +40,10 @@
<!ENTITY enableTelemetryData.accesskey "T">
<!ENTITY telemetryLearnMore.label "Learn More">
<!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 crashReporterDesc2.label "Crash reports help &vendorShortName; fix problems and make your browser more stable and secure">
<!ENTITY alwaysSubmitCrashReports.label "Allow &brandShortName; to send backlogged crash reports on your behalf">
<!ENTITY alwaysSubmitCrashReports.accesskey "c">
<!ENTITY crashReporterLearnMore.label "Learn More">
<!ENTITY networkTab.label "Network">