зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1228090 - Update traacking protection telemetry histogram to represent user setting. r=mfinkle
--HG-- extra : commitid : ID0STPnNMfB extra : rebase_source : 205146246a35eee158845fec4b788edd7018dafa
This commit is contained in:
Родитель
ffff16ffeb
Коммит
d59e4ae5e8
|
@ -594,10 +594,7 @@ var BrowserApp = {
|
||||||
|
|
||||||
if (AppConstants.NIGHTLY_BUILD) {
|
if (AppConstants.NIGHTLY_BUILD) {
|
||||||
InitLater(() => ShumwayUtils.init(), window, "ShumwayUtils");
|
InitLater(() => ShumwayUtils.init(), window, "ShumwayUtils");
|
||||||
InitLater(() => Telemetry.addData("TRACKING_PROTECTION_ENABLED",
|
InitLater(() => Telemetry.addData("FENNEC_TRACKING_PROTECTION_STATE", parseInt(BrowserApp.getTrackingProtectionState())));
|
||||||
Services.prefs.getBoolPref("privacy.trackingprotection.enabled")));
|
|
||||||
InitLater(() => Telemetry.addData("TRACKING_PROTECTION_PBM_DISABLED",
|
|
||||||
!Services.prefs.getBoolPref("privacy.trackingprotection.pbmode.enabled")));
|
|
||||||
InitLater(() => WebcompatReporter.init());
|
InitLater(() => WebcompatReporter.init());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1448,6 +1445,20 @@ var BrowserApp = {
|
||||||
PREF_TRACKING_PROTECTION_ENABLED_PB: "1",
|
PREF_TRACKING_PROTECTION_ENABLED_PB: "1",
|
||||||
PREF_TRACKING_PROTECTION_DISABLED: "0",
|
PREF_TRACKING_PROTECTION_DISABLED: "0",
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the current state of the tracking protection pref.
|
||||||
|
* (0 = Disabled, 1 = Enabled in PB, 2 = Enabled)
|
||||||
|
*/
|
||||||
|
getTrackingProtectionState: function() {
|
||||||
|
if (Services.prefs.getBoolPref("privacy.trackingprotection.enabled")) {
|
||||||
|
return this.PREF_TRACKING_PROTECTION_ENABLED;
|
||||||
|
}
|
||||||
|
if (Services.prefs.getBoolPref("privacy.trackingprotection.pbmode.enabled")) {
|
||||||
|
return this.PREF_TRACKING_PROTECTION_ENABLED_PB;
|
||||||
|
}
|
||||||
|
return this.PREF_TRACKING_PROTECTION_DISABLED;
|
||||||
|
},
|
||||||
|
|
||||||
handlePreferencesRequest: function handlePreferencesRequest(aRequestId,
|
handlePreferencesRequest: function handlePreferencesRequest(aRequestId,
|
||||||
aPrefNames,
|
aPrefNames,
|
||||||
aListen) {
|
aListen) {
|
||||||
|
@ -1488,13 +1499,7 @@ var BrowserApp = {
|
||||||
continue;
|
continue;
|
||||||
case "privacy.trackingprotection.state": {
|
case "privacy.trackingprotection.state": {
|
||||||
pref.type = "string";
|
pref.type = "string";
|
||||||
if (Services.prefs.getBoolPref("privacy.trackingprotection.enabled")) {
|
pref.value = this.getTrackingProtectionState();
|
||||||
pref.value = this.PREF_TRACKING_PROTECTION_ENABLED;
|
|
||||||
} else if (Services.prefs.getBoolPref("privacy.trackingprotection.pbmode.enabled")) {
|
|
||||||
pref.value = this.PREF_TRACKING_PROTECTION_ENABLED_PB;
|
|
||||||
} else {
|
|
||||||
pref.value = this.PREF_TRACKING_PROTECTION_DISABLED;
|
|
||||||
}
|
|
||||||
prefs.push(pref);
|
prefs.push(pref);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
@ -8472,6 +8472,14 @@
|
||||||
"kind": "boolean",
|
"kind": "boolean",
|
||||||
"description": "Is the tracking protection in private browsing mode disabled?"
|
"description": "Is the tracking protection in private browsing mode disabled?"
|
||||||
},
|
},
|
||||||
|
"FENNEC_TRACKING_PROTECTION_STATE": {
|
||||||
|
"expires_in_version": "60",
|
||||||
|
"kind": "enumerated",
|
||||||
|
"n_values": 5,
|
||||||
|
"description": "The state of the user-visible tracking protection setting (0 = Disabled, 1 = Enabled in PB, 2 = Enabled)",
|
||||||
|
"alert_emails": ["mleibovic@mozilla.com"],
|
||||||
|
"bug_numbers": [1228090]
|
||||||
|
},
|
||||||
"TRACKING_PROTECTION_SHIELD": {
|
"TRACKING_PROTECTION_SHIELD": {
|
||||||
"expires_in_version": "never",
|
"expires_in_version": "never",
|
||||||
"kind": "enumerated",
|
"kind": "enumerated",
|
||||||
|
|
Загрузка…
Ссылка в новой задаче