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

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

Issue 865343002: Files.app: Invalidate ScanResult when the scanned directory is changed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/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 386599591047cbf2f8cb3c4e432f90110c58bb57..59f21e9e958830536654ea032900a06e3b4f6f19 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
@@ -154,3 +154,31 @@ TestScanResult.prototype.whenFinal = function() {
TestScanResult.prototype.isFinal = function() {
return this.settled_;
};
+
+/** @override */
+TestScanResult.prototype.isInvalidated = function() {
+ return false;
+};
+
+/**
+ * @constructor
+ * @implements {importer.DirectoryWatcher}
+ */
+function TestDirectoryWatcher(callback) {
+ /**
+ * @public {function()}
+ * @const
+ */
+ this.callback = callback;
+
+ /**
+ * @public {boolean}
+ */
+ this.triggered = false;
+};
+
+/**
+ * @override
+ */
+TestDirectoryWatcher.prototype.addDirectory = function() {
+};

Powered by Google App Engine
This is Rietveld 408576698