Index: chrome/browser/resources/file_manager/js/navigation_list.js |
diff --git a/chrome/browser/resources/file_manager/js/navigation_list.js b/chrome/browser/resources/file_manager/js/navigation_list.js |
index 481e05d9481fa6eb8eb4b3628b68e166fec1f5c4..56ee87472b7ea8dddc39944c758329b1d9a3e79a 100644 |
--- a/chrome/browser/resources/file_manager/js/navigation_list.js |
+++ b/chrome/browser/resources/file_manager/js/navigation_list.js |
@@ -313,6 +313,7 @@ NavigationList.prototype.renderRoot_ = function(path) { |
var handleClick = function() { |
if (item.selected && path !== this.directoryModel_.getCurrentDirPath()) { |
+ metrics.recordUserAction('FolderShortcut.Navigate'); |
this.directoryModel_.changeDirectory(path); |
} |
}.bind(this); |
@@ -349,6 +350,7 @@ NavigationList.prototype.setContextMenu = function(menu) { |
/** |
* Selects the n-th item from the list. |
+ * |
* @param {number} index Item index. |
* @return {boolean} True for success, otherwise false. |
*/ |
@@ -361,9 +363,12 @@ NavigationList.prototype.selectByIndex = function(index) { |
return false; |
// Prevents double-moving to the current directory. |
+ // eg. When user clicks the item, changing directory has already been done in |
+ // click handler. |
if (this.directoryModel_.getCurrentDirEntry().fullPath == newPath) |
return false; |
+ metrics.recordUserAction('FolderShortcut.Navigate'); |
this.directoryModel_.changeDirectory(newPath); |
return true; |
}; |