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/local_file_sync_context.h" | 5 #include "chrome/browser/sync_file_system/local/local_file_sync_context.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/files/file_util.h" | 8 #include "base/files/file_util.h" |
9 #include "base/location.h" | 9 #include "base/location.h" |
10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
(...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
671 this, base::Owned(tracker_ptr), | 671 this, base::Owned(tracker_ptr), |
672 source_url, | 672 source_url, |
673 make_scoped_refptr(file_system_context), | 673 make_scoped_refptr(file_system_context), |
674 base::Owned(origins_with_changes))); | 674 base::Owned(origins_with_changes))); |
675 return; | 675 return; |
676 } | 676 } |
677 if (!operation_runner_) { | 677 if (!operation_runner_) { |
678 DCHECK(!sync_status_); | 678 DCHECK(!sync_status_); |
679 DCHECK(!timer_on_io_); | 679 DCHECK(!timer_on_io_); |
680 sync_status_.reset(new LocalFileSyncStatus); | 680 sync_status_.reset(new LocalFileSyncStatus); |
681 timer_on_io_.reset(new base::OneShotTimer<LocalFileSyncContext>); | 681 timer_on_io_.reset(new base::OneShotTimer); |
682 operation_runner_.reset(new SyncableFileOperationRunner( | 682 operation_runner_.reset(new SyncableFileOperationRunner( |
683 kMaxConcurrentSyncableOperation, | 683 kMaxConcurrentSyncableOperation, |
684 sync_status_.get())); | 684 sync_status_.get())); |
685 sync_status_->AddObserver(this); | 685 sync_status_->AddObserver(this); |
686 } | 686 } |
687 backend->set_sync_context(this); | 687 backend->set_sync_context(this); |
688 DidInitialize(source_url, file_system_context, | 688 DidInitialize(source_url, file_system_context, |
689 SYNC_STATUS_OK); | 689 SYNC_STATUS_OK); |
690 } | 690 } |
691 | 691 |
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1071 return; | 1071 return; |
1072 } | 1072 } |
1073 | 1073 |
1074 FileSystemURL url_for_sync = CreateSyncableFileSystemURLForSync( | 1074 FileSystemURL url_for_sync = CreateSyncableFileSystemURLForSync( |
1075 file_system_context, dest_url); | 1075 file_system_context, dest_url); |
1076 file_system_context->operation_runner()->CopyInForeignFile( | 1076 file_system_context->operation_runner()->CopyInForeignFile( |
1077 local_path, url_for_sync, callback); | 1077 local_path, url_for_sync, callback); |
1078 } | 1078 } |
1079 | 1079 |
1080 } // namespace sync_file_system | 1080 } // namespace sync_file_system |
OLD | NEW |