OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/file_system_provider/fake_provided_file_system
.h" | 5 #include "chrome/browser/chromeos/file_system_provider/fake_provided_file_system
.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/files/file.h" | 9 #include "base/files/file.h" |
10 #include "base/message_loop/message_loop_proxy.h" | 10 #include "base/message_loop/message_loop_proxy.h" |
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 const base::FilePath& file_path, | 243 const base::FilePath& file_path, |
244 const fileapi::AsyncFileUtil::StatusCallback& callback) { | 244 const fileapi::AsyncFileUtil::StatusCallback& callback) { |
245 const base::File::Error result = file_path.AsUTF8Unsafe() != kFakeFilePath | 245 const base::File::Error result = file_path.AsUTF8Unsafe() != kFakeFilePath |
246 ? base::File::FILE_ERROR_EXISTS | 246 ? base::File::FILE_ERROR_EXISTS |
247 : base::File::FILE_OK; | 247 : base::File::FILE_OK; |
248 | 248 |
249 base::MessageLoopProxy::current()->PostTask(FROM_HERE, | 249 base::MessageLoopProxy::current()->PostTask(FROM_HERE, |
250 base::Bind(callback, result)); | 250 base::Bind(callback, result)); |
251 } | 251 } |
252 | 252 |
| 253 void FakeProvidedFileSystem::CopyEntry( |
| 254 const base::FilePath& source_path, |
| 255 const base::FilePath& target_path, |
| 256 const fileapi::AsyncFileUtil::StatusCallback& callback) { |
| 257 base::MessageLoopProxy::current()->PostTask( |
| 258 FROM_HERE, base::Bind(callback, base::File::FILE_OK)); |
| 259 } |
| 260 |
253 const ProvidedFileSystemInfo& FakeProvidedFileSystem::GetFileSystemInfo() | 261 const ProvidedFileSystemInfo& FakeProvidedFileSystem::GetFileSystemInfo() |
254 const { | 262 const { |
255 return file_system_info_; | 263 return file_system_info_; |
256 } | 264 } |
257 | 265 |
258 RequestManager* FakeProvidedFileSystem::GetRequestManager() { | 266 RequestManager* FakeProvidedFileSystem::GetRequestManager() { |
259 NOTREACHED(); | 267 NOTREACHED(); |
260 return NULL; | 268 return NULL; |
261 } | 269 } |
262 | 270 |
263 ProvidedFileSystemInterface* FakeProvidedFileSystem::Create( | 271 ProvidedFileSystemInterface* FakeProvidedFileSystem::Create( |
264 Profile* profile, | 272 Profile* profile, |
265 const ProvidedFileSystemInfo& file_system_info) { | 273 const ProvidedFileSystemInfo& file_system_info) { |
266 return new FakeProvidedFileSystem(file_system_info); | 274 return new FakeProvidedFileSystem(file_system_info); |
267 } | 275 } |
268 | 276 |
269 base::WeakPtr<ProvidedFileSystemInterface> | 277 base::WeakPtr<ProvidedFileSystemInterface> |
270 FakeProvidedFileSystem::GetWeakPtr() { | 278 FakeProvidedFileSystem::GetWeakPtr() { |
271 return weak_ptr_factory_.GetWeakPtr(); | 279 return weak_ptr_factory_.GetWeakPtr(); |
272 } | 280 } |
273 | 281 |
274 } // namespace file_system_provider | 282 } // namespace file_system_provider |
275 } // namespace chromeos | 283 } // namespace chromeos |
OLD | NEW |