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

Unified Diff: ui/file_manager/file_manager/background/js/media_import_handler.js

Issue 954943006: Ensure the destination url reported to ImportHistory is correctly encoded. (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
« no previous file with comments | « no previous file | ui/file_manager/file_manager/background/js/media_import_handler_unittest.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/file_manager/file_manager/background/js/media_import_handler.js
diff --git a/ui/file_manager/file_manager/background/js/media_import_handler.js b/ui/file_manager/file_manager/background/js/media_import_handler.js
index b9f3eb9246648f92aef331631b7ea57a3c09d6ac..683074f0912529a4e9f76f3b0f24cccfe696166c 100644
--- a/ui/file_manager/file_manager/background/js/media_import_handler.js
+++ b/ui/file_manager/file_manager/background/js/media_import_handler.js
@@ -400,7 +400,7 @@ importer.MediaImportHandler.ImportTask.prototype.copy_ =
*/
var onComplete = function(destinationEntry) {
this.cancelCallback_ = null;
- this.markAsCopied_(entry, destinationDirectory);
+ this.markAsCopied_(entry, destinationEntry);
this.notify(importer.TaskQueue.UpdateType.PROGRESS);
resolver.resolve(destinationEntry);
};
@@ -441,23 +441,12 @@ importer.MediaImportHandler.ImportTask.prototype.copy_ =
};
/**
- * A callback to notify listeners when a file has been copied.
- * @param {string} sourceUrl
- * @param {Entry} destination
- */
-importer.MediaImportHandler.ImportTask.prototype.onEntryChanged_ =
- function(sourceUrl, destination) {
- // TODO(kenobi): Add code to notify observers when entries are created.
-};
-
-/**
* @param {!FileEntry} entry
- * @param {!DirectoryEntry} destinationDirectory
+ * @param {!FileEntry} destinationEntry
*/
importer.MediaImportHandler.ImportTask.prototype.markAsCopied_ =
- function(entry, destinationDirectory) {
+ function(entry, destinationEntry) {
this.remainingFilesCount_--;
- var destinationUrl = destinationDirectory.toURL() + '/' + entry.name;
this.historyLoader_.getHistory().then(
/**
* @param {!importer.ImportHistory} history
@@ -467,7 +456,7 @@ importer.MediaImportHandler.ImportTask.prototype.markAsCopied_ =
history.markCopied(
entry,
this.destination_,
- destinationUrl);
+ destinationEntry.toURL());
}.bind(this))
.catch(importer.getLogger().catcher('import-task-mark-as-copied'));
};
« no previous file with comments | « no previous file | ui/file_manager/file_manager/background/js/media_import_handler_unittest.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698