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

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

Issue 881463003: Files.app: Add a deduplication step to avoid importing duplicate media. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync to master; fix Banners test. Created 5 years, 11 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
Index: ui/file_manager/file_manager/background/js/test_duplicate_finder.js
diff --git a/ui/file_manager/file_manager/background/js/test_duplicate_finder.js b/ui/file_manager/file_manager/background/js/test_duplicate_finder.js
new file mode 100644
index 0000000000000000000000000000000000000000..cd09f030f0cd71d1e85a6df2a55b107abbf872cd
--- /dev/null
+++ b/ui/file_manager/file_manager/background/js/test_duplicate_finder.js
@@ -0,0 +1,22 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Namespace
+var importer = importer || {};
+
+/**
+ * A duplicate finder for testing. Allows the return value to be set.
+ * @constructor
+ * @implements {importer.DuplicateFinder}
+ * @struct
+ */
+importer.TestDuplicateFinder = function() {
+ /** @type {boolean} */
+ this.returnValue = false;
+};
+
+/** @override */
+importer.TestDuplicateFinder.prototype.checkDuplicate = function(entry) {
+ return Promise.resolve(this.returnValue);
+};
« no previous file with comments | « ui/file_manager/file_manager/background/js/task_queue.js ('k') | ui/file_manager/file_manager/common/js/importer_common.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698