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

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

Issue 795833002: MediaScanner improvements (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: pull 'n merge. Created 6 years 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
« no previous file with comments | « ui/file_manager/file_manager/common/js/unittest_util.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 23e89602b2dd396854e632d4c1a16f5768505add..a65c37e87ea69183110232bac93df970d23adfe2 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
@@ -1040,11 +1040,10 @@ CommandHandler.COMMANDS_['cloud-import'] = /** @type {Command} */ ({
*/
execute: function(event, fileManager) {
metrics.recordEnum('CloudImport.UserAction', 'IMPORT_INITIATED');
- var currentDirectory = fileManager.getCurrentDirectoryEntry();
- if (currentDirectory !== null) {
- var importer = fileManager.mediaImportHandler;
- importer.importMedia(currentDirectory);
- }
+ var importer = fileManager.mediaImportHandler;
+ importer.importMedia(
+ /** @type {!DirectoryEntry} */ (
+ fileManager.getCurrentDirectoryEntry()));
},
/**
* @param {!Event} event Command event.
« no previous file with comments | « ui/file_manager/file_manager/common/js/unittest_util.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698