| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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/sync_file_system/local/canned_syncable_file_system.h" | 5 #include "chrome/browser/sync_file_system/local/canned_syncable_file_system.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <iterator> | 8 #include <iterator> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 541 const StatusCallback& callback) { | 541 const StatusCallback& callback) { |
| 542 EXPECT_TRUE(is_filesystem_opened_); | 542 EXPECT_TRUE(is_filesystem_opened_); |
| 543 operation_runner()->CreateFile(url, false /* exclusive */, callback); | 543 operation_runner()->CreateFile(url, false /* exclusive */, callback); |
| 544 } | 544 } |
| 545 | 545 |
| 546 void CannedSyncableFileSystem::DoCopy( | 546 void CannedSyncableFileSystem::DoCopy( |
| 547 const FileSystemURL& src_url, | 547 const FileSystemURL& src_url, |
| 548 const FileSystemURL& dest_url, | 548 const FileSystemURL& dest_url, |
| 549 const StatusCallback& callback) { | 549 const StatusCallback& callback) { |
| 550 EXPECT_TRUE(is_filesystem_opened_); | 550 EXPECT_TRUE(is_filesystem_opened_); |
| 551 operation_runner()->Copy(src_url, dest_url, callback); | 551 operation_runner()->Copy( |
| 552 src_url, dest_url, |
| 553 fileapi::FileSystemOperationRunner::CopyProgressCallback(), callback); |
| 552 } | 554 } |
| 553 | 555 |
| 554 void CannedSyncableFileSystem::DoMove( | 556 void CannedSyncableFileSystem::DoMove( |
| 555 const FileSystemURL& src_url, | 557 const FileSystemURL& src_url, |
| 556 const FileSystemURL& dest_url, | 558 const FileSystemURL& dest_url, |
| 557 const StatusCallback& callback) { | 559 const StatusCallback& callback) { |
| 558 EXPECT_TRUE(is_filesystem_opened_); | 560 EXPECT_TRUE(is_filesystem_opened_); |
| 559 operation_runner()->Move(src_url, dest_url, callback); | 561 operation_runner()->Move(src_url, dest_url, callback); |
| 560 } | 562 } |
| 561 | 563 |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 670 sync_status_ = status; | 672 sync_status_ = status; |
| 671 base::MessageLoop::current()->Quit(); | 673 base::MessageLoop::current()->Quit(); |
| 672 } | 674 } |
| 673 | 675 |
| 674 void CannedSyncableFileSystem::InitializeSyncStatusObserver() { | 676 void CannedSyncableFileSystem::InitializeSyncStatusObserver() { |
| 675 ASSERT_TRUE(io_task_runner_->RunsTasksOnCurrentThread()); | 677 ASSERT_TRUE(io_task_runner_->RunsTasksOnCurrentThread()); |
| 676 backend()->sync_context()->sync_status()->AddObserver(this); | 678 backend()->sync_context()->sync_status()->AddObserver(this); |
| 677 } | 679 } |
| 678 | 680 |
| 679 } // namespace sync_file_system | 681 } // namespace sync_file_system |
| OLD | NEW |