| 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 "base/files/file.h" | 7 #include "base/files/file.h" |
| 8 #include "base/message_loop/message_loop_proxy.h" | 8 #include "base/message_loop/message_loop_proxy.h" |
| 9 #include "net/base/io_buffer.h" | 9 #include "net/base/io_buffer.h" |
| 10 | 10 |
| (...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 DCHECK(observer); | 360 DCHECK(observer); |
| 361 observers_.AddObserver(observer); | 361 observers_.AddObserver(observer); |
| 362 } | 362 } |
| 363 | 363 |
| 364 void FakeProvidedFileSystem::RemoveObserver( | 364 void FakeProvidedFileSystem::RemoveObserver( |
| 365 ProvidedFileSystemObserver* observer) { | 365 ProvidedFileSystemObserver* observer) { |
| 366 DCHECK(observer); | 366 DCHECK(observer); |
| 367 observers_.RemoveObserver(observer); | 367 observers_.RemoveObserver(observer); |
| 368 } | 368 } |
| 369 | 369 |
| 370 bool FakeProvidedFileSystem::Notify( | 370 void FakeProvidedFileSystem::Notify( |
| 371 const base::FilePath& entry_path, | 371 const base::FilePath& entry_path, |
| 372 bool recursive, | 372 bool recursive, |
| 373 storage::WatcherManager::ChangeType change_type, | 373 storage::WatcherManager::ChangeType change_type, |
| 374 scoped_ptr<ProvidedFileSystemObserver::Changes> changes, | 374 scoped_ptr<ProvidedFileSystemObserver::Changes> changes, |
| 375 const std::string& tag) { | 375 const std::string& tag, |
| 376 const storage::AsyncFileUtil::StatusCallback& callback) { |
| 376 NOTREACHED(); | 377 NOTREACHED(); |
| 377 return false; | 378 callback.Run(base::File::FILE_ERROR_SECURITY); |
| 378 } | 379 } |
| 379 | 380 |
| 380 ProvidedFileSystemInterface* FakeProvidedFileSystem::Create( | 381 ProvidedFileSystemInterface* FakeProvidedFileSystem::Create( |
| 381 Profile* profile, | 382 Profile* profile, |
| 382 const ProvidedFileSystemInfo& file_system_info) { | 383 const ProvidedFileSystemInfo& file_system_info) { |
| 383 return new FakeProvidedFileSystem(file_system_info); | 384 return new FakeProvidedFileSystem(file_system_info); |
| 384 } | 385 } |
| 385 | 386 |
| 386 base::WeakPtr<ProvidedFileSystemInterface> | 387 base::WeakPtr<ProvidedFileSystemInterface> |
| 387 FakeProvidedFileSystem::GetWeakPtr() { | 388 FakeProvidedFileSystem::GetWeakPtr() { |
| (...skipping 19 matching lines...) Expand all Loading... |
| 407 const std::vector<int>& task_ids, | 408 const std::vector<int>& task_ids, |
| 408 const storage::AsyncFileUtil::StatusCallback& callback) { | 409 const storage::AsyncFileUtil::StatusCallback& callback) { |
| 409 for (size_t i = 0; i < task_ids.size(); ++i) { | 410 for (size_t i = 0; i < task_ids.size(); ++i) { |
| 410 tracker_.TryCancel(task_ids[i]); | 411 tracker_.TryCancel(task_ids[i]); |
| 411 } | 412 } |
| 412 callback.Run(base::File::FILE_OK); | 413 callback.Run(base::File::FILE_OK); |
| 413 } | 414 } |
| 414 | 415 |
| 415 } // namespace file_system_provider | 416 } // namespace file_system_provider |
| 416 } // namespace chromeos | 417 } // namespace chromeos |
| OLD | NEW |