| Index: ui/file_manager/file_manager/background/js/duplicate_finder.js
|
| diff --git a/ui/file_manager/file_manager/background/js/duplicate_finder.js b/ui/file_manager/file_manager/background/js/duplicate_finder.js
|
| index 371e7cd8c1f92facb5487c8b8686534a8c07aba6..f6639534d11e4ee75462d4d419413e4433967107 100644
|
| --- a/ui/file_manager/file_manager/background/js/duplicate_finder.js
|
| +++ b/ui/file_manager/file_manager/background/js/duplicate_finder.js
|
| @@ -200,10 +200,11 @@ importer.DispositionChecker = function(historyLoader, contentMatcher) {
|
| /**
|
| * @param {!FileEntry} entry
|
| * @param {!importer.Destination} destination
|
| + * @param {!importer.ScanMode} mode
|
| * @return {!Promise<!importer.Disposition>}
|
| */
|
| importer.DispositionChecker.prototype.getDisposition =
|
| - function(entry, destination) {
|
| + function(entry, destination, mode) {
|
| if (destination !== importer.Destination.GOOGLE_DRIVE) {
|
| return Promise.reject('Unsupported destination: ' + destination);
|
| }
|
| @@ -220,20 +221,24 @@ importer.DispositionChecker.prototype.getDisposition =
|
| function(duplicate) {
|
| if (duplicate) {
|
| resolve(importer.Disposition.HISTORY_DUPLICATE);
|
| - } else {
|
| - this.contentMatcher_.isDuplicate(entry)
|
| - .then(
|
| - /** @param {boolean} duplicate */
|
| - function(duplicate) {
|
| - if (duplicate) {
|
| - resolve(
|
| - importer.Disposition.CONTENT_DUPLICATE);
|
| - } else {
|
| - resolve(importer.Disposition.ORIGINAL);
|
| - }
|
| - });
|
| - }
|
| - }.bind(this));
|
| + return;
|
| + }
|
| + if (mode == importer.ScanMode.HISTORY) {
|
| + resolve(importer.Disposition.ORIGINAL);
|
| + return;
|
| + }
|
| + this.contentMatcher_.isDuplicate(entry)
|
| + .then(
|
| + /** @param {boolean} duplicate */
|
| + function(duplicate) {
|
| + if (duplicate) {
|
| + resolve(
|
| + importer.Disposition.CONTENT_DUPLICATE);
|
| + } else {
|
| + resolve(importer.Disposition.ORIGINAL);
|
| + }
|
| + });
|
| + }.bind(this));
|
| }.bind(this));
|
| };
|
|
|
| @@ -274,7 +279,8 @@ importer.DispositionChecker.prototype.hasHistoryDuplicate_ =
|
| * @param {!importer.HistoryLoader} historyLoader
|
| * @param {!analytics.Tracker} tracker
|
| *
|
| - * @return {function(!FileEntry, !importer.Destination):
|
| + * @return {function(!FileEntry, !importer.Destination,
|
| + * !importer.ScanMode):
|
| * !Promise<!importer.Disposition>}
|
| */
|
| importer.DispositionChecker.createChecker =
|
|
|