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 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_SYNC_ENGINE_H_ | 5 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_SYNC_ENGINE_H_ |
6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_SYNC_ENGINE_H_ | 6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_SYNC_ENGINE_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
114 // drive::DriveServiceObserver overrides. | 114 // drive::DriveServiceObserver overrides. |
115 virtual void OnReadyToSendRequests() OVERRIDE; | 115 virtual void OnReadyToSendRequests() OVERRIDE; |
116 virtual void OnRefreshTokenInvalid() OVERRIDE; | 116 virtual void OnRefreshTokenInvalid() OVERRIDE; |
117 | 117 |
118 // net::NetworkChangeNotifier::NetworkChangeObserver overrides. | 118 // net::NetworkChangeNotifier::NetworkChangeObserver overrides. |
119 virtual void OnNetworkChanged( | 119 virtual void OnNetworkChanged( |
120 net::NetworkChangeNotifier::ConnectionType type) OVERRIDE; | 120 net::NetworkChangeNotifier::ConnectionType type) OVERRIDE; |
121 | 121 |
122 drive::DriveServiceInterface* GetDriveService(); | 122 drive::DriveServiceInterface* GetDriveService(); |
123 drive::DriveUploaderInterface* GetDriveUploader(); | 123 drive::DriveUploaderInterface* GetDriveUploader(); |
124 MetadataDatabase* GetMetadataDatabase(); | |
125 SyncTaskManager* GetSyncTaskManagerForTesting(); | |
126 | 124 |
127 void OnPendingFileListUpdated(int item_count); | 125 void OnPendingFileListUpdated(int item_count); |
128 void OnFileStatusChanged(const fileapi::FileSystemURL& url, | 126 void OnFileStatusChanged(const fileapi::FileSystemURL& url, |
129 SyncFileStatus file_status, | 127 SyncFileStatus file_status, |
130 SyncAction sync_action, | 128 SyncAction sync_action, |
131 SyncDirection direction); | 129 SyncDirection direction); |
132 void UpdateServiceState(RemoteServiceState state, | 130 void UpdateServiceState(RemoteServiceState state, |
133 const std::string& description); | 131 const std::string& description); |
134 | 132 |
135 private: | 133 private: |
136 class WorkerObserver; | 134 class WorkerObserver; |
137 | 135 |
138 friend class DriveBackendSyncTest; | 136 friend class DriveBackendSyncTest; |
139 friend class SyncEngineTest; | 137 friend class SyncEngineTest; |
140 | 138 |
141 SyncEngine(scoped_ptr<drive::DriveServiceInterface> drive_service, | 139 SyncEngine(scoped_ptr<drive::DriveServiceInterface> drive_service, |
142 scoped_ptr<drive::DriveUploaderInterface> drive_uploader, | 140 scoped_ptr<drive::DriveUploaderInterface> drive_uploader, |
143 base::SequencedTaskRunner* worker_task_runner, | 141 base::SequencedTaskRunner* worker_task_runner, |
144 drive::DriveNotificationManager* notification_manager, | 142 drive::DriveNotificationManager* notification_manager, |
145 ExtensionServiceInterface* extension_service, | 143 ExtensionServiceInterface* extension_service, |
146 SigninManagerBase* signin_manager); | 144 SigninManagerBase* signin_manager); |
147 | 145 |
148 void UpdateRegisteredApps(); | 146 void UpdateRegisteredAppsForTesting(); |
nhiroki
2014/06/02 05:43:56
How about having a comment like "This is not threa
peria
2014/06/02 05:57:30
Done.
| |
149 | 147 |
150 scoped_ptr<drive::DriveServiceInterface> drive_service_; | 148 scoped_ptr<drive::DriveServiceInterface> drive_service_; |
151 scoped_ptr<DriveServiceWrapper> drive_service_wrapper_; | 149 scoped_ptr<DriveServiceWrapper> drive_service_wrapper_; |
152 scoped_ptr<drive::DriveUploaderInterface> drive_uploader_; | 150 scoped_ptr<drive::DriveUploaderInterface> drive_uploader_; |
153 scoped_ptr<DriveUploaderWrapper> drive_uploader_wrapper_; | 151 scoped_ptr<DriveUploaderWrapper> drive_uploader_wrapper_; |
154 RemoteChangeProcessor* remote_change_processor_; | 152 RemoteChangeProcessor* remote_change_processor_; |
155 scoped_ptr<RemoteChangeProcessorWrapper> remote_change_processor_wrapper_; | 153 scoped_ptr<RemoteChangeProcessorWrapper> remote_change_processor_wrapper_; |
156 | 154 |
157 scoped_ptr<RemoteChangeProcessorOnWorker> remote_change_processor_on_worker_; | 155 scoped_ptr<RemoteChangeProcessorOnWorker> remote_change_processor_on_worker_; |
158 | 156 |
(...skipping 15 matching lines...) Expand all Loading... | |
174 scoped_refptr<base::SequencedTaskRunner> worker_task_runner_; | 172 scoped_refptr<base::SequencedTaskRunner> worker_task_runner_; |
175 | 173 |
176 base::WeakPtrFactory<SyncEngine> weak_ptr_factory_; | 174 base::WeakPtrFactory<SyncEngine> weak_ptr_factory_; |
177 DISALLOW_COPY_AND_ASSIGN(SyncEngine); | 175 DISALLOW_COPY_AND_ASSIGN(SyncEngine); |
178 }; | 176 }; |
179 | 177 |
180 } // namespace drive_backend | 178 } // namespace drive_backend |
181 } // namespace sync_file_system | 179 } // namespace sync_file_system |
182 | 180 |
183 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_SYNC_ENGINE_H_ | 181 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_SYNC_ENGINE_H_ |
OLD | NEW |