Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(103)

Unified Diff: ui/file_manager/file_manager/foreground/js/quick_view_uma.js

Issue 2577123004: Export the dialog type where Quick View is opened. (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/file_manager/file_manager/foreground/js/file_manager.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 c7b73fa629171eadb4e5ddf15b156d6128755b62..66d7df66af711ccb0fd44a6fcafbe2ff586a8171 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
@@ -6,16 +6,22 @@
* UMA exporter for Quick View.
*
* @param {!VolumeManagerWrapper} volumeManager
+ * @param {!DialogType} dialogType
*
* @constructor
*/
-function QuickViewUma(volumeManager) {
+function QuickViewUma(volumeManager, dialogType) {
/**
* @type {!VolumeManagerWrapper}
* @private
*/
this.volumeManager_ = volumeManager;
+ /**
+ * @type {DialogType}
+ * @private
+ */
+ this.dialogType_ = dialogType;
}
/**
@@ -73,4 +79,13 @@ QuickViewUma.prototype.onOpened = function(entry) {
} else {
console.error('Unknown volume type: ' + volumeType);
}
+ // Record stats of dialog types. It must be in sync with
+ // FileDialogType enum in tools/metrics/histograms/histogram.xml.
+ metrics.recordEnum('QuickView.DialogType', this.dialogType_,
+ [DialogType.SELECT_FOLDER,
+ DialogType.SELECT_UPLOAD_FOLDER,
+ DialogType.SELECT_SAVEAS_FILE,
+ DialogType.SELECT_OPEN_FILE,
+ DialogType.SELECT_OPEN_MULTI_FILE,
+ DialogType.FULL_PAGE]);
};
« no previous file with comments | « ui/file_manager/file_manager/foreground/js/file_manager.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698