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

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

Issue 1038433002: Update scanning to scan files in small batches (well batches of 1)...this fixes an issue where scan… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Respond to review comments. Created 5 years, 9 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/mock_media_scanner.js
diff --git a/ui/file_manager/file_manager/background/js/mock_media_scanner.js b/ui/file_manager/file_manager/background/js/mock_media_scanner.js
index 5c804aa82a2be1027946079aafee0480aca92c1f..ddc26da980adaa75e81cee0bf5cbb2328721766f 100644
--- a/ui/file_manager/file_manager/background/js/mock_media_scanner.js
+++ b/ui/file_manager/file_manager/background/js/mock_media_scanner.js
@@ -46,7 +46,16 @@ TestMediaScanner.prototype.removeObserver = function(observer) {
};
/** @override */
-TestMediaScanner.prototype.scan = function(entries) {
+TestMediaScanner.prototype.scanDirectory = function(directory) {
+ var scan = new TestScanResult(this.fileEntries);
+ scan.totalBytes = this.totalBytes;
+ scan.scanDuration = this.scanDuration;
+ this.scans_.push(scan);
+ return scan;
+};
+
+/** @override */
+TestMediaScanner.prototype.scanFiles = function(entries) {
var scan = new TestScanResult(this.fileEntries);
scan.totalBytes = this.totalBytes;
scan.scanDuration = this.scanDuration;

Powered by Google App Engine
This is Rietveld 408576698