зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1097876 - Collect UITelemetry about the Panic Button, r=florian.
This commit is contained in:
Родитель
fe7057dc3e
Коммит
d800aa1a06
|
@ -10,6 +10,8 @@ this.EXPORTED_SYMBOLS = ["CustomizableWidgets"];
|
|||
Cu.import("resource:///modules/CustomizableUI.jsm");
|
||||
Cu.import("resource://gre/modules/Services.jsm");
|
||||
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "BrowserUITelemetry",
|
||||
"resource:///modules/BrowserUITelemetry.jsm");
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "PlacesUtils",
|
||||
"resource://gre/modules/PlacesUtils.jsm");
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "PlacesUIUtils",
|
||||
|
@ -1012,6 +1014,7 @@ if (Services.prefs.getBoolPref("privacy.panicButton.enabled")) {
|
|||
this._ensureSanitizer();
|
||||
this._sanitizer.range = this._getSanitizeRange(doc);
|
||||
let group = doc.getElementById("PanelUI-panic-timeSpan");
|
||||
BrowserUITelemetry.countPanicEvent(group.selectedItem.id);
|
||||
group.selectedItem = doc.getElementById("PanelUI-panic-5min");
|
||||
let itemsToClear = [
|
||||
"cookies", "history", "openWindows", "formdata", "sessions", "cache", "downloads"
|
||||
|
|
|
@ -599,6 +599,10 @@ this.BrowserUITelemetry = {
|
|||
this._countEvent(["click-builtin-item", source, "search-settings"]);
|
||||
},
|
||||
|
||||
countPanicEvent: function(timeId) {
|
||||
this._countEvent(["forget-button", timeId]);
|
||||
},
|
||||
|
||||
_logAwesomeBarSearchResult: function (url) {
|
||||
let spec = Services.search.parseSubmissionURL(url);
|
||||
if (spec.engine) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче