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

Unified Diff: components/arc/test/fake_file_system_instance.cc

Issue 2637163002: Defer ARC file system operations while ARC is booting. (Closed)
Patch Set: Addressed hidehiko's comments. Created 3 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: components/arc/test/fake_file_system_instance.cc
diff --git a/components/arc/test/fake_file_system_instance.cc b/components/arc/test/fake_file_system_instance.cc
index d9c6f833ba5083c13de5197352ebb1af6ebae844..19237ec767d20811d4cac36ecbbf0b4a2445dcdb 100644
--- a/components/arc/test/fake_file_system_instance.cc
+++ b/components/arc/test/fake_file_system_instance.cc
@@ -4,6 +4,9 @@
#include "components/arc/test/fake_file_system_instance.h"
+#include "base/optional.h"
+#include "mojo/public/cpp/system/handle.h"
+
namespace arc {
FakeFileSystemInstance::FakeFileSystemInstance() = default;
@@ -13,20 +16,30 @@ FakeFileSystemInstance::~FakeFileSystemInstance() = default;
void FakeFileSystemInstance::GetChildDocuments(
const std::string& authority,
const std::string& document_id,
- const GetChildDocumentsCallback& callback) {}
+ const GetChildDocumentsCallback& callback) {
+ callback.Run(base::nullopt);
+}
void FakeFileSystemInstance::GetDocument(const std::string& authority,
const std::string& document_id,
- const GetDocumentCallback& callback) {}
+ const GetDocumentCallback& callback) {
+ callback.Run(mojom::DocumentPtr());
+}
void FakeFileSystemInstance::GetFileSize(const std::string& url,
- const GetFileSizeCallback& callback) {}
+ const GetFileSizeCallback& callback) {
+ callback.Run(-1);
+}
void FakeFileSystemInstance::OpenFileToRead(
const std::string& url,
- const OpenFileToReadCallback& callback) {}
+ const OpenFileToReadCallback& callback) {
+ callback.Run(mojo::ScopedHandle());
+}
void FakeFileSystemInstance::RequestMediaScan(
- const std::vector<std::string>& paths) {}
+ const std::vector<std::string>& paths) {
+ // Do nothing and pretend we scaned them.
+}
} // namespace arc

Powered by Google App Engine
This is Rietveld 408576698