OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "chrome/browser/chromeos/drive/fake_file_system.h" | 5 #include "chrome/browser/chromeos/drive/fake_file_system.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 const FileOperationCallback& callback) { | 67 const FileOperationCallback& callback) { |
68 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 68 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
69 } | 69 } |
70 | 70 |
71 void FakeFileSystem::OpenFile(const base::FilePath& file_path, | 71 void FakeFileSystem::OpenFile(const base::FilePath& file_path, |
72 OpenMode open_mode, | 72 OpenMode open_mode, |
73 const OpenFileCallback& callback) { | 73 const OpenFileCallback& callback) { |
74 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 74 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
75 } | 75 } |
76 | 76 |
77 void FakeFileSystem::CloseFile(const base::FilePath& file_path, | |
78 const FileOperationCallback& callback) { | |
79 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | |
80 } | |
81 | |
82 void FakeFileSystem::Copy(const base::FilePath& src_file_path, | 77 void FakeFileSystem::Copy(const base::FilePath& src_file_path, |
83 const base::FilePath& dest_file_path, | 78 const base::FilePath& dest_file_path, |
84 const FileOperationCallback& callback) { | 79 const FileOperationCallback& callback) { |
85 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 80 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
86 } | 81 } |
87 | 82 |
88 void FakeFileSystem::Move(const base::FilePath& src_file_path, | 83 void FakeFileSystem::Move(const base::FilePath& src_file_path, |
89 const base::FilePath& dest_file_path, | 84 const base::FilePath& dest_file_path, |
90 const FileOperationCallback& callback) { | 85 const FileOperationCallback& callback) { |
91 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 86 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 198 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
204 } | 199 } |
205 | 200 |
206 void FakeFileSystem::GetMetadata( | 201 void FakeFileSystem::GetMetadata( |
207 const GetFilesystemMetadataCallback& callback) { | 202 const GetFilesystemMetadataCallback& callback) { |
208 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 203 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
209 } | 204 } |
210 | 205 |
211 void FakeFileSystem::MarkCacheFileAsMounted( | 206 void FakeFileSystem::MarkCacheFileAsMounted( |
212 const base::FilePath& drive_file_path, | 207 const base::FilePath& drive_file_path, |
213 const OpenFileCallback& callback) { | 208 const MarkMountedCallback& callback) { |
214 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 209 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
215 } | 210 } |
216 | 211 |
217 void FakeFileSystem::MarkCacheFileAsUnmounted( | 212 void FakeFileSystem::MarkCacheFileAsUnmounted( |
218 const base::FilePath& cache_file_path, | 213 const base::FilePath& cache_file_path, |
219 const FileOperationCallback& callback) { | 214 const FileOperationCallback& callback) { |
220 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 215 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
221 } | 216 } |
222 | 217 |
223 void FakeFileSystem::GetCacheEntryByResourceId( | 218 void FakeFileSystem::GetCacheEntryByResourceId( |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
375 callback.Run(FILE_ERROR_OK, entry.Pass()); | 370 callback.Run(FILE_ERROR_OK, entry.Pass()); |
376 return; | 371 return; |
377 } | 372 } |
378 } | 373 } |
379 | 374 |
380 callback.Run(FILE_ERROR_NOT_FOUND, scoped_ptr<ResourceEntry>()); | 375 callback.Run(FILE_ERROR_NOT_FOUND, scoped_ptr<ResourceEntry>()); |
381 } | 376 } |
382 | 377 |
383 } // namespace test_util | 378 } // namespace test_util |
384 } // namespace drive | 379 } // namespace drive |
OLD | NEW |