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/drive_backend/remote_to_local_syncer.h
" | 5 #include "chrome/browser/sync_file_system/drive_backend/remote_to_local_syncer.h
" |
6 | 6 |
7 #include "base/callback.h" | 7 #include "base/callback.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "chrome/browser/sync_file_system/drive_backend/sync_engine_context.h" |
9 | 10 |
10 namespace sync_file_system { | 11 namespace sync_file_system { |
11 namespace drive_backend { | 12 namespace drive_backend { |
12 | 13 |
13 RemoteToLocalSyncer::RemoteToLocalSyncer() { | 14 RemoteToLocalSyncer::RemoteToLocalSyncer(SyncEngineContext* sync_context) |
14 NOTIMPLEMENTED(); | 15 : sync_context_(sync_context), |
| 16 weak_ptr_factory_(this) { |
15 } | 17 } |
16 | 18 |
17 RemoteToLocalSyncer::~RemoteToLocalSyncer() { | 19 RemoteToLocalSyncer::~RemoteToLocalSyncer() { |
18 NOTIMPLEMENTED(); | 20 NOTIMPLEMENTED(); |
19 } | 21 } |
20 | 22 |
21 void RemoteToLocalSyncer::Run(const SyncStatusCallback& callback) { | 23 void RemoteToLocalSyncer::Run(const SyncStatusCallback& callback) { |
22 NOTIMPLEMENTED(); | 24 NOTIMPLEMENTED(); |
23 callback.Run(SYNC_STATUS_FAILED); | 25 callback.Run(SYNC_STATUS_FAILED); |
24 } | 26 } |
25 | 27 |
| 28 drive::DriveServiceInterface* RemoteToLocalSyncer::drive_service() { |
| 29 return sync_context_->GetDriveService(); |
| 30 } |
| 31 |
| 32 MetadataDatabase* RemoteToLocalSyncer::metadata_database() { |
| 33 return sync_context_->GetMetadataDatabase(); |
| 34 } |
| 35 |
| 36 RemoteChangeProcessor* RemoteToLocalSyncer::remote_change_processor() { |
| 37 DCHECK(sync_context_->GetRemoteChangeProcessor()); |
| 38 return sync_context_->GetRemoteChangeProcessor(); |
| 39 } |
| 40 |
26 } // namespace drive_backend | 41 } // namespace drive_backend |
27 } // namespace sync_file_system | 42 } // namespace sync_file_system |
OLD | NEW |