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

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

Issue 933553003: Files.app: Analytics tweaks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 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_();

Powered by Google App Engine
This is Rietveld 408576698