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 576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
587 operation_runner()->CreateFile(url, false /* exclusive */, callback); | 587 operation_runner()->CreateFile(url, false /* exclusive */, callback); |
588 } | 588 } |
589 | 589 |
590 void CannedSyncableFileSystem::DoCopy( | 590 void CannedSyncableFileSystem::DoCopy( |
591 const FileSystemURL& src_url, | 591 const FileSystemURL& src_url, |
592 const FileSystemURL& dest_url, | 592 const FileSystemURL& dest_url, |
593 const StatusCallback& callback) { | 593 const StatusCallback& callback) { |
594 EXPECT_TRUE(io_task_runner_->RunsTasksOnCurrentThread()); | 594 EXPECT_TRUE(io_task_runner_->RunsTasksOnCurrentThread()); |
595 EXPECT_TRUE(is_filesystem_opened_); | 595 EXPECT_TRUE(is_filesystem_opened_); |
596 operation_runner()->Copy( | 596 operation_runner()->Copy( |
597 src_url, | 597 src_url, dest_url, storage::FileSystemOperation::OPTION_NONE, |
598 dest_url, | 598 storage::FileSystemOperation::ERROR_BEHAVIOR_ABORT, |
599 storage::FileSystemOperation::OPTION_NONE, | 599 storage::FileSystemOperationRunner::CopyProgressCallback(), callback); |
600 storage::FileSystemOperationRunner::CopyProgressCallback(), | |
601 callback); | |
602 } | 600 } |
603 | 601 |
604 void CannedSyncableFileSystem::DoMove( | 602 void CannedSyncableFileSystem::DoMove( |
605 const FileSystemURL& src_url, | 603 const FileSystemURL& src_url, |
606 const FileSystemURL& dest_url, | 604 const FileSystemURL& dest_url, |
607 const StatusCallback& callback) { | 605 const StatusCallback& callback) { |
608 EXPECT_TRUE(io_task_runner_->RunsTasksOnCurrentThread()); | 606 EXPECT_TRUE(io_task_runner_->RunsTasksOnCurrentThread()); |
609 EXPECT_TRUE(is_filesystem_opened_); | 607 EXPECT_TRUE(is_filesystem_opened_); |
610 operation_runner()->Move( | 608 operation_runner()->Move( |
611 src_url, dest_url, storage::FileSystemOperation::OPTION_NONE, callback); | 609 src_url, dest_url, storage::FileSystemOperation::OPTION_NONE, callback); |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
757 sync_status_ = status; | 755 sync_status_ = status; |
758 quit_closure.Run(); | 756 quit_closure.Run(); |
759 } | 757 } |
760 | 758 |
761 void CannedSyncableFileSystem::InitializeSyncStatusObserver() { | 759 void CannedSyncableFileSystem::InitializeSyncStatusObserver() { |
762 ASSERT_TRUE(io_task_runner_->RunsTasksOnCurrentThread()); | 760 ASSERT_TRUE(io_task_runner_->RunsTasksOnCurrentThread()); |
763 backend()->sync_context()->sync_status()->AddObserver(this); | 761 backend()->sync_context()->sync_status()->AddObserver(this); |
764 } | 762 } |
765 | 763 |
766 } // namespace sync_file_system | 764 } // namespace sync_file_system |
OLD | NEW |