Skip to content

Commit a51a025

Browse files
jackfranklinDevtools-frontend LUCI CQ
authored andcommitted
RPP: add VE logs to file save actions
Bug: none Change-Id: I6c3752adbde3fce8a9872630bebaac663fcb4e18 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6054292 Auto-Submit: Jack Franklin <[email protected]> Commit-Queue: Nancy Li <[email protected]> Reviewed-by: Nancy Li <[email protected]>
1 parent 0c8fe7f commit a51a025

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

front_end/panels/timeline/TimelinePanel.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -990,14 +990,18 @@ export class TimelinePanel extends UI.Panel.Panel implements Client, TimelineMod
990990
this.panelToolbar.removeToolbarItem(this.#sidebarToggleButton);
991991
}
992992

993-
private populateDownloadMenu(contextMenu: UI.ContextMenu.ContextMenu): void {
993+
#populateDownloadMenu(contextMenu: UI.ContextMenu.ContextMenu): void {
994994
contextMenu.viewSection().appendItem(i18nString(UIStrings.saveTraceWithAnnotationsMenuOption), () => {
995995
Host.userMetrics.actionTaken(Host.UserMetrics.Action.PerfPanelTraceExported);
996996
void this.saveToFile(/* isEnhancedTraces */ false, /* addModifications */ true);
997+
}, {
998+
jslogContext: 'timeline.save-to-file-with-annotations',
997999
});
9981000
contextMenu.viewSection().appendItem(i18nString(UIStrings.saveTraceWithoutAnnotationsMenuOption), () => {
9991001
Host.userMetrics.actionTaken(Host.UserMetrics.Action.PerfPanelTraceExported);
10001002
void this.saveToFile();
1003+
}, {
1004+
jslogContext: 'timeline.save-to-file-without-annotations',
10011005
});
10021006
}
10031007

@@ -1018,7 +1022,7 @@ export class TimelinePanel extends UI.Panel.Panel implements Client, TimelineMod
10181022
});
10191023

10201024
this.saveButton = new UI.Toolbar.ToolbarMenuButton(
1021-
this.populateDownloadMenu.bind(this), true, true, 'timeline.save-to-file-more-options', 'download');
1025+
this.#populateDownloadMenu.bind(this), true, true, 'timeline.save-to-file-more-options', 'download');
10221026
this.saveButton.setTitle(i18nString(UIStrings.saveProfile));
10231027

10241028
if (Root.Runtime.experiments.isEnabled(Root.Runtime.ExperimentName.TIMELINE_ENHANCED_TRACES)) {

front_end/ui/visual_logging/KnownContextValues.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3325,6 +3325,8 @@ export const knownContextValues = new Set([
33253325
'timeline.reveal-in-network',
33263326
'timeline.save-to-file',
33273327
'timeline.save-to-file-more-options',
3328+
'timeline.save-to-file-with-annotations',
3329+
'timeline.save-to-file-without-annotations',
33283330
'timeline.settings',
33293331
'timeline.setup',
33303332
'timeline.show-history',

0 commit comments

Comments
 (0)