| 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(); | 124 MetadataDatabase* GetMetadataDatabaseForTesting(); |
| 125 SyncTaskManager* GetSyncTaskManagerForTesting(); | 125 SyncTaskManager* GetSyncTaskManagerForTesting(); |
| 126 | 126 |
| 127 void OnPendingFileListUpdated(int item_count); | 127 void OnPendingFileListUpdated(int item_count); |
| 128 void OnFileStatusChanged(const fileapi::FileSystemURL& url, | 128 void OnFileStatusChanged(const fileapi::FileSystemURL& url, |
| 129 SyncFileStatus file_status, | 129 SyncFileStatus file_status, |
| 130 SyncAction sync_action, | 130 SyncAction sync_action, |
| 131 SyncDirection direction); | 131 SyncDirection direction); |
| 132 void UpdateServiceState(RemoteServiceState state, | 132 void UpdateServiceState(RemoteServiceState state, |
| 133 const std::string& description); | 133 const std::string& description); |
| 134 void DidPromoteDemotedChanges(size_t num_trackers); |
| 134 | 135 |
| 135 private: | 136 private: |
| 136 class WorkerObserver; | 137 class WorkerObserver; |
| 137 | 138 |
| 138 friend class DriveBackendSyncTest; | 139 friend class DriveBackendSyncTest; |
| 139 friend class SyncEngineTest; | 140 friend class SyncEngineTest; |
| 140 | 141 |
| 141 SyncEngine(scoped_ptr<drive::DriveServiceInterface> drive_service, | 142 SyncEngine(scoped_ptr<drive::DriveServiceInterface> drive_service, |
| 142 scoped_ptr<drive::DriveUploaderInterface> drive_uploader, | 143 scoped_ptr<drive::DriveUploaderInterface> drive_uploader, |
| 143 base::SequencedTaskRunner* worker_task_runner, | 144 base::SequencedTaskRunner* worker_task_runner, |
| 144 drive::DriveNotificationManager* notification_manager, | 145 drive::DriveNotificationManager* notification_manager, |
| 145 ExtensionServiceInterface* extension_service, | 146 ExtensionServiceInterface* extension_service, |
| 146 SigninManagerBase* signin_manager); | 147 SigninManagerBase* signin_manager); |
| 147 | 148 |
| 148 void UpdateRegisteredApps(); | 149 void UpdateRegisteredAppsForTesting(); |
| 149 | 150 |
| 150 scoped_ptr<drive::DriveServiceInterface> drive_service_; | 151 scoped_ptr<drive::DriveServiceInterface> drive_service_; |
| 151 scoped_ptr<DriveServiceWrapper> drive_service_wrapper_; | 152 scoped_ptr<DriveServiceWrapper> drive_service_wrapper_; |
| 152 scoped_ptr<drive::DriveUploaderInterface> drive_uploader_; | 153 scoped_ptr<drive::DriveUploaderInterface> drive_uploader_; |
| 153 scoped_ptr<DriveUploaderWrapper> drive_uploader_wrapper_; | 154 scoped_ptr<DriveUploaderWrapper> drive_uploader_wrapper_; |
| 154 RemoteChangeProcessor* remote_change_processor_; | 155 RemoteChangeProcessor* remote_change_processor_; |
| 155 scoped_ptr<RemoteChangeProcessorWrapper> remote_change_processor_wrapper_; | 156 scoped_ptr<RemoteChangeProcessorWrapper> remote_change_processor_wrapper_; |
| 156 | 157 |
| 157 scoped_ptr<RemoteChangeProcessorOnWorker> remote_change_processor_on_worker_; | 158 scoped_ptr<RemoteChangeProcessorOnWorker> remote_change_processor_on_worker_; |
| 158 | 159 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 174 scoped_refptr<base::SequencedTaskRunner> worker_task_runner_; | 175 scoped_refptr<base::SequencedTaskRunner> worker_task_runner_; |
| 175 | 176 |
| 176 base::WeakPtrFactory<SyncEngine> weak_ptr_factory_; | 177 base::WeakPtrFactory<SyncEngine> weak_ptr_factory_; |
| 177 DISALLOW_COPY_AND_ASSIGN(SyncEngine); | 178 DISALLOW_COPY_AND_ASSIGN(SyncEngine); |
| 178 }; | 179 }; |
| 179 | 180 |
| 180 } // namespace drive_backend | 181 } // namespace drive_backend |
| 181 } // namespace sync_file_system | 182 } // namespace sync_file_system |
| 182 | 183 |
| 183 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_SYNC_ENGINE_H_ | 184 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_SYNC_ENGINE_H_ |
| OLD | NEW |