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

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

Issue 2081603003: Add UMA for Quick View (file type and volume type). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 4 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 d68398af960adc1c04cec525ee5bdf7d153d487e..d859d5fe8edfa5131c4f4c5098e1e45b8055623c 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
@@ -12,12 +12,13 @@
* @param {!QuickViewModel} quickViewModel
* @param {!TaskController} taskController
* @param {!cr.ui.ListSelectionModel} fileListSelectionModel
+ * @param {!QuickViewUma} quickViewUma
*
* @constructor
*/
function QuickViewController(
quickView, metadataModel, selectionHandler, listContainer, quickViewModel,
- taskController, fileListSelectionModel) {
+ taskController, fileListSelectionModel, quickViewUma) {
/**
* @type {!FilesQuickView}
* @private
@@ -31,6 +32,12 @@ function QuickViewController(
this.quickViewModel_ = quickViewModel;
/**
+ * @type {!QuickViewUma}
+ * @private
+ */
+ this.quickViewUma_ = quickViewUma;
+
+ /**
* @type {!MetadataModel}
* @private
*/
@@ -139,6 +146,7 @@ QuickViewController.prototype.display_ = function() {
this.updateQuickView_().then(function() {
if (!this.quickView_.isOpened()) {
this.quickView_.open();
+ this.quickViewUma_.onOpened(this.entries_[0]);
}
}.bind(this));
};
@@ -173,6 +181,7 @@ QuickViewController.prototype.updateQuickView_ = function() {
var entry =
(/** @type {!FileEntry} */ (this.quickViewModel_.getSelectedEntry()));
assert(entry);
+ this.quickViewUma_.onEntryChanged(entry);
return this.metadataModel_.get([entry], ['thumbnailUrl', 'externalFileUrl'])
.then(this.onMetadataLoaded_.bind(this, entry));
};

Powered by Google App Engine
This is Rietveld 408576698