OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "components/arc/test/fake_file_system_instance.h" | 5 #include "components/arc/test/fake_file_system_instance.h" |
6 | 6 |
| 7 #include "base/optional.h" |
| 8 #include "mojo/public/cpp/system/handle.h" |
| 9 |
7 namespace arc { | 10 namespace arc { |
8 | 11 |
9 FakeFileSystemInstance::FakeFileSystemInstance() = default; | 12 FakeFileSystemInstance::FakeFileSystemInstance() = default; |
10 | 13 |
11 FakeFileSystemInstance::~FakeFileSystemInstance() = default; | 14 FakeFileSystemInstance::~FakeFileSystemInstance() = default; |
12 | 15 |
13 void FakeFileSystemInstance::GetChildDocuments( | 16 void FakeFileSystemInstance::GetChildDocuments( |
14 const std::string& authority, | 17 const std::string& authority, |
15 const std::string& document_id, | 18 const std::string& document_id, |
16 const GetChildDocumentsCallback& callback) {} | 19 const GetChildDocumentsCallback& callback) { |
| 20 callback.Run(base::nullopt); |
| 21 } |
17 | 22 |
18 void FakeFileSystemInstance::GetDocument(const std::string& authority, | 23 void FakeFileSystemInstance::GetDocument(const std::string& authority, |
19 const std::string& document_id, | 24 const std::string& document_id, |
20 const GetDocumentCallback& callback) {} | 25 const GetDocumentCallback& callback) { |
| 26 callback.Run(mojom::DocumentPtr()); |
| 27 } |
21 | 28 |
22 void FakeFileSystemInstance::GetFileSize(const std::string& url, | 29 void FakeFileSystemInstance::GetFileSize(const std::string& url, |
23 const GetFileSizeCallback& callback) {} | 30 const GetFileSizeCallback& callback) { |
| 31 callback.Run(-1); |
| 32 } |
24 | 33 |
25 void FakeFileSystemInstance::OpenFileToRead( | 34 void FakeFileSystemInstance::OpenFileToRead( |
26 const std::string& url, | 35 const std::string& url, |
27 const OpenFileToReadCallback& callback) {} | 36 const OpenFileToReadCallback& callback) { |
| 37 callback.Run(mojo::ScopedHandle()); |
| 38 } |
28 | 39 |
29 void FakeFileSystemInstance::RequestMediaScan( | 40 void FakeFileSystemInstance::RequestMediaScan( |
30 const std::vector<std::string>& paths) {} | 41 const std::vector<std::string>& paths) { |
| 42 // Do nothing and pretend we scaned them. |
| 43 } |
31 | 44 |
32 } // namespace arc | 45 } // namespace arc |
OLD | NEW |