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_), |