зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1013601 - Part 2: Change callers to use uptimeMillis(). r=rnewman
This commit is contained in:
Родитель
13afe3aeb4
Коммит
2baf2ffaad
|
@ -289,10 +289,8 @@ AboutReader.prototype = {
|
|||
this._isReadingListItem = (this._isReadingListItem == 1) ? 0 : 1;
|
||||
this._updateToggleButton();
|
||||
|
||||
// Create a relative timestamp for telemetry
|
||||
let uptime = Date.now() - Services.startup.getStartupInfo().linkerInitialized;
|
||||
|
||||
if (this._isReadingListItem == 1) {
|
||||
let uptime = UITelemetry.uptimeMillis();
|
||||
gChromeWin.Reader.storeArticleInCache(this._article, function(success) {
|
||||
dump("Reader:Add (in reader) success=" + success);
|
||||
|
||||
|
@ -320,7 +318,7 @@ AboutReader.prototype = {
|
|||
// updated (handled in this file).
|
||||
Services.obs.notifyObservers(null, "Reader:Remove", this._article.url);
|
||||
|
||||
UITelemetry.addEvent("unsave.1", "button", uptime, "reader");
|
||||
UITelemetry.addEvent("unsave.1", "button", null, "reader");
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -334,9 +332,7 @@ AboutReader.prototype = {
|
|||
title: this._article.title
|
||||
});
|
||||
|
||||
// Create a relative timestamp for telemetry
|
||||
let uptime = Date.now() - Services.startup.getStartupInfo().linkerInitialized;
|
||||
UITelemetry.addEvent("share.1", "list", uptime);
|
||||
UITelemetry.addEvent("share.1", "list", null);
|
||||
},
|
||||
|
||||
_setFontSize: function Reader_setFontSize(newFontSize) {
|
||||
|
@ -704,11 +700,9 @@ AboutReader.prototype = {
|
|||
|
||||
aEvent.stopPropagation();
|
||||
|
||||
// Create a relative timestamp for telemetry
|
||||
let uptime = Date.now() - Services.startup.getStartupInfo().linkerInitialized;
|
||||
// Just pass the ID of the button as an extra and hope the ID doesn't change
|
||||
// unless the context changes
|
||||
UITelemetry.addEvent("action.1", "button", uptime, id);
|
||||
UITelemetry.addEvent("action.1", "button", null, id);
|
||||
|
||||
let items = segmentedButton.children;
|
||||
for (let j = items.length - 1; j >= 0; j--) {
|
||||
|
|
|
@ -7498,9 +7498,7 @@ let Reader = {
|
|||
type: "Reader:LongClick",
|
||||
});
|
||||
|
||||
// Create a relative timestamp for telemetry
|
||||
let uptime = Date.now() - Services.startup.getStartupInfo().linkerInitialized;
|
||||
UITelemetry.addEvent("save.1", "pageaction", uptime, "reader");
|
||||
UITelemetry.addEvent("save.1", "pageaction", null, "reader");
|
||||
},
|
||||
},
|
||||
|
||||
|
@ -7510,9 +7508,6 @@ let Reader = {
|
|||
delete this.pageAction.id;
|
||||
}
|
||||
|
||||
// Create a relative timestamp for telemetry
|
||||
let uptime = Date.now() - Services.startup.getStartupInfo().linkerInitialized;
|
||||
|
||||
if (tab.readerActive) {
|
||||
this.pageAction.id = NativeWindow.pageactions.add({
|
||||
title: Strings.browser.GetStringFromName("readerMode.exit"),
|
||||
|
@ -7523,12 +7518,12 @@ let Reader = {
|
|||
|
||||
// Only start a reader session if the viewer is in the foreground. We do
|
||||
// not track background reader viewers.
|
||||
UITelemetry.startSession("reader.1", uptime);
|
||||
UITelemetry.startSession("reader.1", null);
|
||||
return;
|
||||
}
|
||||
|
||||
// Only stop a reader session if the foreground viewer is not visible.
|
||||
UITelemetry.stopSession("reader.1", "", uptime);
|
||||
UITelemetry.stopSession("reader.1", "", null);
|
||||
|
||||
if (tab.readerEnabled) {
|
||||
this.pageAction.id = NativeWindow.pageactions.add({
|
||||
|
@ -8102,9 +8097,7 @@ var ExternalApps = {
|
|||
icon: "drawable://icon_openinapp",
|
||||
|
||||
clickCallback: () => {
|
||||
// Create a relative timestamp for telemetry
|
||||
let uptime = Date.now() - Services.startup.getStartupInfo().linkerInitialized;
|
||||
UITelemetry.addEvent("launch.1", "pageaction", uptime, "helper");
|
||||
UITelemetry.addEvent("launch.1", "pageaction", null, "helper");
|
||||
|
||||
if (apps.length > 1) {
|
||||
// Use the HelperApps prompt here to filter out any Http handlers
|
||||
|
|
Загрузка…
Ссылка в новой задаче