| 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 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 } | 259 } |
| 260 | 260 |
| 261 void FakeProvidedFileSystem::MoveEntry( | 261 void FakeProvidedFileSystem::MoveEntry( |
| 262 const base::FilePath& source_path, | 262 const base::FilePath& source_path, |
| 263 const base::FilePath& target_path, | 263 const base::FilePath& target_path, |
| 264 const fileapi::AsyncFileUtil::StatusCallback& callback) { | 264 const fileapi::AsyncFileUtil::StatusCallback& callback) { |
| 265 base::MessageLoopProxy::current()->PostTask( | 265 base::MessageLoopProxy::current()->PostTask( |
| 266 FROM_HERE, base::Bind(callback, base::File::FILE_OK)); | 266 FROM_HERE, base::Bind(callback, base::File::FILE_OK)); |
| 267 } | 267 } |
| 268 | 268 |
| 269 void FakeProvidedFileSystem::Truncate( |
| 270 const base::FilePath& file_path, |
| 271 int64 length, |
| 272 const fileapi::AsyncFileUtil::StatusCallback& callback) { |
| 273 base::MessageLoopProxy::current()->PostTask( |
| 274 FROM_HERE, base::Bind(callback, base::File::FILE_OK)); |
| 275 } |
| 276 |
| 269 const ProvidedFileSystemInfo& FakeProvidedFileSystem::GetFileSystemInfo() | 277 const ProvidedFileSystemInfo& FakeProvidedFileSystem::GetFileSystemInfo() |
| 270 const { | 278 const { |
| 271 return file_system_info_; | 279 return file_system_info_; |
| 272 } | 280 } |
| 273 | 281 |
| 274 RequestManager* FakeProvidedFileSystem::GetRequestManager() { | 282 RequestManager* FakeProvidedFileSystem::GetRequestManager() { |
| 275 NOTREACHED(); | 283 NOTREACHED(); |
| 276 return NULL; | 284 return NULL; |
| 277 } | 285 } |
| 278 | 286 |
| 279 ProvidedFileSystemInterface* FakeProvidedFileSystem::Create( | 287 ProvidedFileSystemInterface* FakeProvidedFileSystem::Create( |
| 280 Profile* profile, | 288 Profile* profile, |
| 281 const ProvidedFileSystemInfo& file_system_info) { | 289 const ProvidedFileSystemInfo& file_system_info) { |
| 282 return new FakeProvidedFileSystem(file_system_info); | 290 return new FakeProvidedFileSystem(file_system_info); |
| 283 } | 291 } |
| 284 | 292 |
| 285 base::WeakPtr<ProvidedFileSystemInterface> | 293 base::WeakPtr<ProvidedFileSystemInterface> |
| 286 FakeProvidedFileSystem::GetWeakPtr() { | 294 FakeProvidedFileSystem::GetWeakPtr() { |
| 287 return weak_ptr_factory_.GetWeakPtr(); | 295 return weak_ptr_factory_.GetWeakPtr(); |
| 288 } | 296 } |
| 289 | 297 |
| 290 } // namespace file_system_provider | 298 } // namespace file_system_provider |
| 291 } // namespace chromeos | 299 } // namespace chromeos |
| OLD | NEW |