Bug 1097876 - Collect UITelemetry about the Panic Button, r=florian.

This commit is contained in:
Abhilash Mhaisne 2015-02-20 12:43:57 +01:00
Родитель fe7057dc3e
Коммит d800aa1a06
2 изменённых файлов: 7 добавлений и 0 удалений

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

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