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 b7758a32397482bc8932cda68a118ebc64e6b21a..d070441282947ed001ef07ced2bd88e3c38506e2 100644 |
--- a/ui/file_manager/file_manager/foreground/js/file_manager.js |
+++ b/ui/file_manager/file_manager/foreground/js/file_manager.js |
@@ -809,6 +809,8 @@ FileManager.prototype = /** @struct */ { |
* @private |
*/ |
FileManager.prototype.onHistoryChanged_ = function(event) { |
+ this.tracker_.send(metrics.ImportEvents.HISTORY_CHANGED); |
+ |
// Ignore any entry that isn't an immediate child of the |
// current directory. |
util.isChildEntry(event.entry, this.getCurrentDirectoryEntry()) |
@@ -860,6 +862,19 @@ FileManager.prototype = /** @struct */ { |
this.selectionHandler_.onFileSelectionChanged.bind( |
this.selectionHandler_)); |
+ this.directoryModel_.addEventListener( |
+ 'directory-changed', |
+ function(event) { |
+ if (event.volumeChanged) { |
+ var volumeInfo = |
+ this.volumeManager_.getVolumeInfo(event.newDirEntry); |
+ // NOTE: That dynamic values, like volume name MUST NOT |
+ // be sent to GA as that value can contain PII. |
+ // VolumeType is an enum. |
+ this.tracker_.sendAppView(volumeInfo.volumeType()); |
+ } |
+ }.bind(this)); |
+ |
// TODO(mtomasz, yoshiki): Create navigation list earlier, and here just |
// attach the directory model. |
this.initDirectoryTree_(); |