Index: ui/file_manager/file_manager/foreground/js/file_manager_commands.js |
diff --git a/ui/file_manager/file_manager/foreground/js/file_manager_commands.js b/ui/file_manager/file_manager/foreground/js/file_manager_commands.js |
index 3b1bf35ec005fdb4878c5f6583f9f1e2c3cd0d62..1d684d058b15f439d9aaa42e1c71604d8038d61a 100644 |
--- a/ui/file_manager/file_manager/foreground/js/file_manager_commands.js |
+++ b/ui/file_manager/file_manager/foreground/js/file_manager_commands.js |
@@ -107,23 +107,6 @@ CommandUtil.canExecuteAlways = function(event) { |
}; |
/** |
- * Returns a single selected/passed entry or null. |
- * @param {!Event} event Command event. |
- * @param {!FileManager} fileManager FileManager to use. |
- * @return {FileEntry} The entry or null. |
- */ |
-CommandUtil.getSingleEntry = function(event, fileManager) { |
- if (event.target.entry) { |
- return event.target.entry; |
- } |
- var selection = fileManager.getSelection(); |
- if (selection.totalCount == 1) { |
- return selection.entries[0]; |
- } |
- return null; |
-}; |
- |
-/** |
* Obtains target entries that can be pinned from the selection. |
* If directories are included in the selection, it just returns an empty |
* array to avoid confusing because pinning directory is not supported |
@@ -236,7 +219,7 @@ CommandUtil.getOnlyOneSelectedDirectory = function(selection) { |
return null; |
if (!selection.entries[0].isDirectory) |
return null; |
- return selection.entries[0]; |
+ return /** @type {!DirectoryEntry} */(selection.entries[0]); |
}; |
/** |