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

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

Issue 2628833002: Quick View UMA: export how quick view was opened. (Closed)
Patch Set: Rebase. Created 3 years, 11 months 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
Index: ui/file_manager/file_manager/foreground/js/quick_view_controller.js
diff --git a/ui/file_manager/file_manager/foreground/js/quick_view_controller.js b/ui/file_manager/file_manager/foreground/js/quick_view_controller.js
index 25667c77adc378c35d2996dc9c1bf19c282b5086..7435dc650796cbc154d2e1314229f9bd321e65eb 100644
--- a/ui/file_manager/file_manager/foreground/js/quick_view_controller.js
+++ b/ui/file_manager/file_manager/foreground/js/quick_view_controller.js
@@ -90,7 +90,7 @@ function QuickViewController(
'keydown', this.onKeyDownToOpen_.bind(this));
this.listContainer_.element.addEventListener('command', function(event) {
if(event.command.id === 'get-info')
- this.display_();
+ this.display_(QuickViewUma.WayToOpen.CONTEXT_MENU);
}.bind(this));
}
@@ -151,7 +151,7 @@ QuickViewController.prototype.onKeyDownToOpen_ = function(event) {
return;
if (event.key === ' ') {
event.preventDefault();
- this.display_();
+ this.display_(QuickViewUma.WayToOpen.SPACE_KEY);
}
};
@@ -188,13 +188,15 @@ QuickViewController.prototype.onQuickViewKeyDown_ = function(event) {
/**
* Display quick view.
*
+ * @param {QuickViewUma.WayToOpen=} opt_wayToOpen in which way opening of
+ * quick view was triggered. Can be omitted if quick view is already open.
* @private
*/
-QuickViewController.prototype.display_ = function() {
+QuickViewController.prototype.display_ = function(opt_wayToOpen) {
this.updateQuickView_().then(function() {
if (!this.quickView_.isOpened()) {
this.quickView_.open();
- this.quickViewUma_.onOpened(this.entries_[0]);
+ this.quickViewUma_.onOpened(this.entries_[0], assert(opt_wayToOpen));
}
}.bind(this));
};
« no previous file with comments | « tools/metrics/histograms/histograms.xml ('k') | ui/file_manager/file_manager/foreground/js/quick_view_uma.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698