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

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

Issue 2873903004: Add UMA to count directory-changed events by RootType. (Closed)
Patch Set: Revert unused code Created 3 years, 7 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/file_manager.js
diff --git a/ui/file_manager/file_manager/foreground/js/file_manager.js b/ui/file_manager/file_manager/foreground/js/file_manager.js
index c4635da0ac643f2eb060a48d271641dead44565b..926b56447947aa15536e68e8d5d503fd21cca3bb 100644
--- a/ui/file_manager/file_manager/foreground/js/file_manager.js
+++ b/ui/file_manager/file_manager/foreground/js/file_manager.js
@@ -278,6 +278,13 @@ function FileManager() {
*/
this.quickViewController_ = null;
+ /**
+ * Records histograms of directory-changed event.
+ * @type {NavigationUma}
+ * @private
+ */
+ this.navigationUma_ = null;
+
// --------------------------------------------------------------------------
// DOM elements.
@@ -514,6 +521,13 @@ FileManager.prototype = /** @struct */ {
listBeingUpdated = null;
});
+ this.directoryModel_.addEventListener(
+ 'directory-changed',
+ /** @param {!Event} event */
+ function(event) {
+ this.navigationUma_.onDirectoryChanged(event.newDirEntry);
+ }.bind(this));
+
this.initCommands_();
assert(this.directoryModel_);
@@ -1117,6 +1131,7 @@ FileManager.prototype = /** @struct */ {
var addNewServicesVisible =
this.dialogType === DialogType.FULL_PAGE &&
!chrome.extension.inIncognitoContext;
+ this.navigationUma_ = new NavigationUma(assert(this.volumeManager_));
DirectoryTree.decorate(directoryTree,
assert(this.directoryModel_),
assert(this.volumeManager_),

Powered by Google App Engine
This is Rietveld 408576698