| Index: ui/file_manager/file_manager/foreground/js/quick_view_uma.js
|
| diff --git a/ui/file_manager/file_manager/foreground/js/quick_view_uma.js b/ui/file_manager/file_manager/foreground/js/quick_view_uma.js
|
| index 66d7df66af711ccb0fd44a6fcafbe2ff586a8171..a56557e3f17a58d66c9fded1d3d80618e83d9493 100644
|
| --- a/ui/file_manager/file_manager/foreground/js/quick_view_uma.js
|
| +++ b/ui/file_manager/file_manager/foreground/js/quick_view_uma.js
|
| @@ -25,6 +25,27 @@ function QuickViewUma(volumeManager, dialogType) {
|
| }
|
|
|
| /**
|
| + * In which way quick view was opened.
|
| + * @enum {string}
|
| + * @const
|
| + */
|
| +QuickViewUma.WayToOpen = {
|
| + CONTEXT_MENU: 'contextMenu',
|
| + SPACE_KEY: 'spaceKey',
|
| +};
|
| +
|
| +/**
|
| + * The order should be consistnet with the definition in histograms.xml.
|
| + *
|
| + * @const {!Array<QuickViewUma.WayToOpen>}
|
| + * @private
|
| + */
|
| +QuickViewUma.WayToOpenValues_ = [
|
| + QuickViewUma.WayToOpen.CONTEXT_MENU,
|
| + QuickViewUma.WayToOpen.SPACE_KEY,
|
| +];
|
| +
|
| +/**
|
| * Keep the order of this in sync with FileManagerVolumeType in
|
| * tools/metrics/histograms/histograms.xml.
|
| *
|
| @@ -69,9 +90,13 @@ QuickViewUma.prototype.onEntryChanged = function(entry) {
|
| * Exports UMA based on the entry selected when Quick View is opened.
|
| *
|
| * @param {!FileEntry} entry
|
| + * @param {QuickViewUma.WayToOpen} wayToOpen
|
| */
|
| -QuickViewUma.prototype.onOpened = function(entry) {
|
| +QuickViewUma.prototype.onOpened = function(entry, wayToOpen) {
|
| this.exportFileType_(entry, 'QuickView.FileTypeOnLaunch');
|
| + metrics.recordEnum(
|
| + 'QuickView.WayToOpen', wayToOpen, QuickViewUma.WayToOpenValues_);
|
| +
|
| var volumeType = this.volumeManager_.getVolumeInfo(entry).volumeType;
|
| if (QuickViewUma.VolumeType.includes(volumeType)) {
|
| metrics.recordEnum(
|
|
|