mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
bug 809094 - update pref pane to support Firefox Health Report, r=gavin,gps
--HG-- extra : rebase_source : 39ac9f3f0f107de91b17c136d6f06fe475858578
This commit is contained in:
parent
2e373f285f
commit
1a730fab1d
@ -857,6 +857,10 @@ pref("breakpad.reportURL", "http://crash-stats.mozilla.com/report/index/");
|
|||||||
pref("toolkit.crashreporter.pluginHangSubmitURL",
|
pref("toolkit.crashreporter.pluginHangSubmitURL",
|
||||||
"https://hang-reports.mozilla.org/submit");
|
"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
|
// base URL for web-based support pages
|
||||||
pref("app.support.baseURL", "http://support.mozilla.org/1/firefox/%VERSION%/%OS%/%LOCALE%/");
|
pref("app.support.baseURL", "http://support.mozilla.org/1/firefox/%VERSION%/%OS%/%LOCALE%/");
|
||||||
|
|
||||||
|
@ -48,9 +48,11 @@ var gAdvancedPane = {
|
|||||||
#ifdef MOZ_CRASHREPORTER
|
#ifdef MOZ_CRASHREPORTER
|
||||||
this.initSubmitCrashes();
|
this.initSubmitCrashes();
|
||||||
#endif
|
#endif
|
||||||
#ifdef MOZ_TELEMETRY_ON_BY_DEFAULT
|
|
||||||
this.initTelemetry();
|
this.initTelemetry();
|
||||||
|
#ifdef MOZ_SERVICES_HEALTHREPORT
|
||||||
|
this.initSubmitHealthReport();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
this.updateActualCacheSize("disk");
|
this.updateActualCacheSize("disk");
|
||||||
this.updateActualCacheSize("offline");
|
this.updateActualCacheSize("offline");
|
||||||
|
|
||||||
@ -129,6 +131,34 @@ var gAdvancedPane = {
|
|||||||
return checkbox.checked ? (this._storedSpellCheck == 2 ? 2 : 1) : 0;
|
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");
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@ -142,6 +172,7 @@ var gAdvancedPane = {
|
|||||||
} catch (e) {
|
} catch (e) {
|
||||||
checkbox.style.display = "none";
|
checkbox.style.display = "none";
|
||||||
}
|
}
|
||||||
|
this._setupLearnMoreLink("toolkit.crashreporter.infoURL", "crashReporterLearnMore");
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -157,16 +188,19 @@ var gAdvancedPane = {
|
|||||||
} catch (e) { }
|
} catch (e) { }
|
||||||
},
|
},
|
||||||
|
|
||||||
#ifdef MOZ_TELEMETRY_ON_BY_DEFAULT
|
|
||||||
/**
|
/**
|
||||||
* When telemetry is opt-out, verify if the user explicitly rejected the
|
* When telemetry is opt-out, verify if the user explicitly rejected the
|
||||||
* telemetry prompt, and if so reflect his choice in the current preference
|
* 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
|
* 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
|
* prompt but later enabled it in preferences in builds before the fix for
|
||||||
* bug 737600.
|
* bug 737600.
|
||||||
|
*
|
||||||
|
* In all cases, set up the Learn More link sanely
|
||||||
*/
|
*/
|
||||||
initTelemetry: function ()
|
initTelemetry: function ()
|
||||||
{
|
{
|
||||||
|
#ifdef MOZ_TELEMETRY_ON_BY_DEFAULT
|
||||||
const PREF_TELEMETRY_ENABLED = "toolkit.telemetry.enabledPreRelease";
|
const PREF_TELEMETRY_ENABLED = "toolkit.telemetry.enabledPreRelease";
|
||||||
let enabled = Services.prefs.getBoolPref(PREF_TELEMETRY_ENABLED);
|
let enabled = Services.prefs.getBoolPref(PREF_TELEMETRY_ENABLED);
|
||||||
let rejected = false;
|
let rejected = false;
|
||||||
@ -176,8 +210,9 @@ var gAdvancedPane = {
|
|||||||
if (enabled && rejected) {
|
if (enabled && rejected) {
|
||||||
Services.prefs.setBoolPref(PREF_TELEMETRY_ENABLED, false);
|
Services.prefs.setBoolPref(PREF_TELEMETRY_ENABLED, false);
|
||||||
}
|
}
|
||||||
},
|
|
||||||
#endif
|
#endif
|
||||||
|
this._setupLearnMoreLink("toolkit.telemetry.infoURL", "telemetryLearnMore");
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* When the user toggles telemetry, update the rejected value as well, so we
|
* When the user toggles telemetry, update the rejected value as well, so we
|
||||||
@ -191,19 +226,57 @@ var gAdvancedPane = {
|
|||||||
displayed.value = @MOZ_TELEMETRY_DISPLAY_REV@;
|
displayed.value = @MOZ_TELEMETRY_DISPLAY_REV@;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
#ifdef MOZ_SERVICES_HEALTHREPORT
|
||||||
/**
|
/**
|
||||||
* When the user toggles the layers.acceleration.disabled pref,
|
* Initialize the health report service reference and checkbox.
|
||||||
* sync its new value to the gfx.direct2d.disabled pref too.
|
|
||||||
*/
|
*/
|
||||||
updateHardwareAcceleration: function()
|
initSubmitHealthReport: function () {
|
||||||
{
|
this._setupLearnMoreLink("healthreport.infoURL", "FHRLearnMore");
|
||||||
#ifdef XP_WIN
|
|
||||||
var fromPref = document.getElementById("layers.acceleration.disabled");
|
let reporter = Components.classes["@mozilla.org/healthreport/service;1"]
|
||||||
var toPref = document.getElementById("gfx.direct2d.disabled");
|
.getService(Components.interfaces.nsISupports)
|
||||||
toPref.value = fromPref.value;
|
.wrappedJSObject
|
||||||
#endif
|
.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;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
#endif
|
||||||
|
|
||||||
// NETWORK TAB
|
// NETWORK TAB
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -50,6 +50,8 @@
|
|||||||
type="bool"/>
|
type="bool"/>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
<!-- Data Choices tab -->
|
||||||
|
|
||||||
#ifdef MOZ_TELEMETRY_REPORTING
|
#ifdef MOZ_TELEMETRY_REPORTING
|
||||||
<preference id="toolkit.telemetry.enabled"
|
<preference id="toolkit.telemetry.enabled"
|
||||||
#ifdef MOZ_TELEMETRY_ON_BY_DEFAULT
|
#ifdef MOZ_TELEMETRY_ON_BY_DEFAULT
|
||||||
@ -128,6 +130,7 @@
|
|||||||
|
|
||||||
<tabs id="tabsElement">
|
<tabs id="tabsElement">
|
||||||
<tab id="generalTab" label="&generalTab.label;" helpTopic="prefs-advanced-general"/>
|
<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="networkTab" label="&networkTab.label;" helpTopic="prefs-advanced-network"/>
|
||||||
<tab id="updateTab" label="&updateTab.label;" helpTopic="prefs-advanced-update"/>
|
<tab id="updateTab" label="&updateTab.label;" helpTopic="prefs-advanced-update"/>
|
||||||
<tab id="encryptionTab" label="&encryptionTab.label;" helpTopic="prefs-advanced-encryption"/>
|
<tab id="encryptionTab" label="&encryptionTab.label;" helpTopic="prefs-advanced-encryption"/>
|
||||||
@ -180,11 +183,11 @@
|
|||||||
preference="layout.spellcheckDefault"/>
|
preference="layout.spellcheckDefault"/>
|
||||||
</groupbox>
|
</groupbox>
|
||||||
|
|
||||||
|
#ifdef HAVE_SHELL_SERVICE
|
||||||
<!-- System Defaults -->
|
<!-- System Defaults -->
|
||||||
<groupbox id="systemDefaultsGroup" orient="vertical">
|
<groupbox id="systemDefaultsGroup" orient="vertical">
|
||||||
<caption label="&systemDefaults.label;"/>
|
<caption label="&systemDefaults.label;"/>
|
||||||
|
|
||||||
#ifdef HAVE_SHELL_SERVICE
|
|
||||||
<checkbox id="alwaysCheckDefault" preference="browser.shell.checkDefaultBrowser"
|
<checkbox id="alwaysCheckDefault" preference="browser.shell.checkDefaultBrowser"
|
||||||
label="&alwaysCheckDefault.label;" accesskey="&alwaysCheckDefault.accesskey;"
|
label="&alwaysCheckDefault.label;" accesskey="&alwaysCheckDefault.accesskey;"
|
||||||
flex="1"/>
|
flex="1"/>
|
||||||
@ -197,20 +200,71 @@
|
|||||||
<description>&isDefault.label;</description>
|
<description>&isDefault.label;</description>
|
||||||
</deck>
|
</deck>
|
||||||
</hbox>
|
</hbox>
|
||||||
#ifdef MOZ_CRASHREPORTER
|
|
||||||
<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>
|
</groupbox>
|
||||||
|
#endif
|
||||||
</tabpanel>
|
</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>
|
||||||
|
</groupbox>
|
||||||
|
#endif
|
||||||
|
</tabpanel>
|
||||||
|
#endif
|
||||||
<!-- Network -->
|
<!-- Network -->
|
||||||
<tabpanel id="networkPanel" orient="vertical">
|
<tabpanel id="networkPanel" orient="vertical">
|
||||||
|
|
||||||
|
@ -39,8 +39,9 @@ var gAdvancedPane = {
|
|||||||
#ifdef MOZ_CRASHREPORTER
|
#ifdef MOZ_CRASHREPORTER
|
||||||
this.initSubmitCrashes();
|
this.initSubmitCrashes();
|
||||||
#endif
|
#endif
|
||||||
#ifdef MOZ_TELEMETRY_ON_BY_DEFAULT
|
|
||||||
this.initTelemetry();
|
this.initTelemetry();
|
||||||
|
#ifdef MOZ_SERVICES_HEALTHREPORT
|
||||||
|
this.initSubmitHealthReport();
|
||||||
#endif
|
#endif
|
||||||
this.updateActualCacheSize("disk");
|
this.updateActualCacheSize("disk");
|
||||||
this.updateActualCacheSize("offline");
|
this.updateActualCacheSize("offline");
|
||||||
@ -117,11 +118,43 @@ var gAdvancedPane = {
|
|||||||
return checkbox.checked ? (this._storedSpellCheck == 2 ? 2 : 1) : 0;
|
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 ()
|
initSubmitCrashes: function ()
|
||||||
{
|
{
|
||||||
|
this._setupLearnMoreLink("toolkit.crashreporter.infoURL",
|
||||||
|
"crashReporterLearnMore");
|
||||||
|
|
||||||
var checkbox = document.getElementById("submitCrashesBox");
|
var checkbox = document.getElementById("submitCrashesBox");
|
||||||
try {
|
try {
|
||||||
var cr = Components.classes["@mozilla.org/toolkit/crash-reporter;1"].
|
var cr = Components.classes["@mozilla.org/toolkit/crash-reporter;1"].
|
||||||
@ -145,16 +178,18 @@ var gAdvancedPane = {
|
|||||||
} catch (e) { }
|
} catch (e) { }
|
||||||
},
|
},
|
||||||
|
|
||||||
#ifdef MOZ_TELEMETRY_ON_BY_DEFAULT
|
|
||||||
/**
|
/**
|
||||||
* When telemetry is opt-out, verify if the user explicitly rejected the
|
* When telemetry is opt-out, verify if the user explicitly rejected the
|
||||||
* telemetry prompt, and if so reflect his choice in the current preference
|
* 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
|
* 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
|
* prompt but later enabled it in preferences in builds before the fix for
|
||||||
* bug 737600.
|
* bug 737600.
|
||||||
|
*
|
||||||
|
* In all cases, set up the Learn More link sanely
|
||||||
*/
|
*/
|
||||||
initTelemetry: function ()
|
initTelemetry: function ()
|
||||||
{
|
{
|
||||||
|
#ifdef MOZ_TELEMETRY_ON_BY_DEFAULT
|
||||||
const PREF_TELEMETRY_ENABLED = "toolkit.telemetry.enabledPreRelease";
|
const PREF_TELEMETRY_ENABLED = "toolkit.telemetry.enabledPreRelease";
|
||||||
let enabled = Services.prefs.getBoolPref(PREF_TELEMETRY_ENABLED);
|
let enabled = Services.prefs.getBoolPref(PREF_TELEMETRY_ENABLED);
|
||||||
let rejected = false;
|
let rejected = false;
|
||||||
@ -164,8 +199,10 @@ var gAdvancedPane = {
|
|||||||
if (enabled && rejected) {
|
if (enabled && rejected) {
|
||||||
Services.prefs.setBoolPref(PREF_TELEMETRY_ENABLED, false);
|
Services.prefs.setBoolPref(PREF_TELEMETRY_ENABLED, false);
|
||||||
}
|
}
|
||||||
},
|
|
||||||
#endif
|
#endif
|
||||||
|
this._setupLearnMoreLink("toolkit.telemetry.infoURL", "telemetryLearnMore");
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* When the user toggles telemetry, update the rejected value as well, so we
|
* When the user toggles telemetry, update the rejected value as well, so we
|
||||||
@ -179,19 +216,57 @@ var gAdvancedPane = {
|
|||||||
displayed.value = @MOZ_TELEMETRY_DISPLAY_REV@;
|
displayed.value = @MOZ_TELEMETRY_DISPLAY_REV@;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
#ifdef MOZ_SERVICES_HEALTHREPORT
|
||||||
/**
|
/**
|
||||||
* When the user toggles the layers.acceleration.disabled pref,
|
* Initialize the health report service reference and checkbox.
|
||||||
* sync its new value to the gfx.direct2d.disabled pref too.
|
|
||||||
*/
|
*/
|
||||||
updateHardwareAcceleration: function()
|
initSubmitHealthReport: function () {
|
||||||
{
|
this._setupLearnMoreLink("healthreport.infoURL", "FHRLearnMore");
|
||||||
#ifdef XP_WIN
|
|
||||||
var fromPref = document.getElementById("layers.acceleration.disabled");
|
let reporter = Components.classes["@mozilla.org/healthreport/service;1"]
|
||||||
var toPref = document.getElementById("gfx.direct2d.disabled");
|
.getService(Components.interfaces.nsISupports)
|
||||||
toPref.value = fromPref.value;
|
.wrappedJSObject
|
||||||
#endif
|
.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;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
#endif
|
||||||
|
|
||||||
// NETWORK TAB
|
// NETWORK TAB
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -152,6 +152,7 @@
|
|||||||
|
|
||||||
<tabs id="tabsElement">
|
<tabs id="tabsElement">
|
||||||
<tab id="generalTab" label="&generalTab.label;" helpTopic="prefs-advanced-general"/>
|
<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="networkTab" label="&networkTab.label;" helpTopic="prefs-advanced-network"/>
|
||||||
<tab id="updateTab" label="&updateTab.label;" helpTopic="prefs-advanced-update"/>
|
<tab id="updateTab" label="&updateTab.label;" helpTopic="prefs-advanced-update"/>
|
||||||
<tab id="encryptionTab" label="&encryptionTab.label;" helpTopic="prefs-advanced-encryption"/>
|
<tab id="encryptionTab" label="&encryptionTab.label;" helpTopic="prefs-advanced-encryption"/>
|
||||||
@ -201,11 +202,11 @@
|
|||||||
onsynctopreference="return gAdvancedPane.writeCheckSpelling();"
|
onsynctopreference="return gAdvancedPane.writeCheckSpelling();"
|
||||||
preference="layout.spellcheckDefault"/>
|
preference="layout.spellcheckDefault"/>
|
||||||
</groupbox>
|
</groupbox>
|
||||||
|
#ifdef HAVE_SHELL_SERVICE
|
||||||
<!-- System Defaults -->
|
<!-- System Defaults -->
|
||||||
<groupbox id="systemDefaultsGroup" orient="vertical">
|
<groupbox id="systemDefaultsGroup" orient="vertical">
|
||||||
<caption label="&systemDefaults.label;"/>
|
<caption label="&systemDefaults.label;"/>
|
||||||
|
|
||||||
#ifdef HAVE_SHELL_SERVICE
|
|
||||||
<checkbox id="alwaysCheckDefault" preference="browser.shell.checkDefaultBrowser"
|
<checkbox id="alwaysCheckDefault" preference="browser.shell.checkDefaultBrowser"
|
||||||
label="&alwaysCheckDefault.label;" accesskey="&alwaysCheckDefault.accesskey;"
|
label="&alwaysCheckDefault.label;" accesskey="&alwaysCheckDefault.accesskey;"
|
||||||
flex="1"/>
|
flex="1"/>
|
||||||
@ -218,19 +219,70 @@
|
|||||||
<description>&isDefault.label;</description>
|
<description>&isDefault.label;</description>
|
||||||
</deck>
|
</deck>
|
||||||
</hbox>
|
</hbox>
|
||||||
#ifdef MOZ_CRASHREPORTER
|
|
||||||
<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>
|
</groupbox>
|
||||||
|
#endif
|
||||||
</tabpanel>
|
</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>
|
||||||
|
</groupbox>
|
||||||
|
#endif
|
||||||
|
</tabpanel>
|
||||||
|
#endif
|
||||||
|
|
||||||
<!-- Network -->
|
<!-- Network -->
|
||||||
<tabpanel id="networkPanel" orient="vertical">
|
<tabpanel id="networkPanel" orient="vertical">
|
||||||
|
@ -32,10 +32,26 @@
|
|||||||
<!ENTITY setDefault.label "Make &brandShortName; the default browser">
|
<!ENTITY setDefault.label "Make &brandShortName; the default browser">
|
||||||
<!ENTITY setDefault.accesskey "d">
|
<!ENTITY setDefault.accesskey "d">
|
||||||
<!ENTITY isDefault.label "&brandShortName; is currently your default browser">
|
<!ENTITY isDefault.label "&brandShortName; is currently your default browser">
|
||||||
<!ENTITY submitCrashes.label "Submit crash reports">
|
|
||||||
<!ENTITY submitCrashes.accesskey "S">
|
<!ENTITY dataChoicesTab.label "Data Choices">
|
||||||
<!ENTITY submitTelemetry.label "Submit performance data">
|
|
||||||
<!ENTITY submitTelemetry.accesskey "P">
|
<!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 networkTab.label "Network">
|
<!ENTITY networkTab.label "Network">
|
||||||
|
|
||||||
|
@ -21,4 +21,4 @@ pref("healthreport.policy.nextDataSubmissionTime", "0");
|
|||||||
pref("healthreport.service.enabled", true);
|
pref("healthreport.service.enabled", true);
|
||||||
pref("healthreport.service.loadDelayMsec", 10000);
|
pref("healthreport.service.loadDelayMsec", 10000);
|
||||||
pref("healthreport.service.providerCategories", "healthreport-js-provider");
|
pref("healthreport.service.providerCategories", "healthreport-js-provider");
|
||||||
|
pref("healthreport.infoURL", "http://www.mozilla.org/legal/privacy/firefox.html#health-report");
|
||||||
|
Loading…
Reference in New Issue
Block a user