| 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 0135363a2493de1a1392f2277b1cf3c93141a121..9c62f45f4bf072cfd9be5ef625a3f6e5839ffec2 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
|
| @@ -311,7 +311,7 @@ importer.MediaImportHandler.ImportTask.prototype.importOne_ =
|
| if (isDuplicate) {
|
| // If the given file is a duplicate, don't import it again. Just
|
| // update the progress indicator.
|
| - // TODO(kenobi): Update import history to mark the dupe as sync'd.
|
| + this.markAsImported_(entry);
|
| this.processedBytes_ += entry.size;
|
| this.notify(importer.TaskQueue.UpdateType.PROGRESS);
|
| return Promise.resolve();
|
| @@ -427,6 +427,22 @@ importer.MediaImportHandler.ImportTask.prototype.markAsCopied_ =
|
| });
|
| };
|
|
|
| +/**
|
| + * @param {!FileEntry} entry
|
| + * @param {!DirectoryEntry} destination
|
| + */
|
| +importer.MediaImportHandler.ImportTask.prototype.markAsImported_ =
|
| + function(entry) {
|
| + this.remainingFilesCount_--;
|
| + this.historyLoader_.getHistory().then(
|
| + /** @param {!importer.ImportHistory} history */
|
| + function(history) {
|
| + history.markImported(
|
| + entry,
|
| + importer.Destination.GOOGLE_DRIVE);
|
| + });
|
| +};
|
| +
|
| /** @private */
|
| importer.MediaImportHandler.ImportTask.prototype.onSuccess_ = function() {
|
| this.notify(importer.TaskQueue.UpdateType.SUCCESS);
|
|
|