OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_WORKER_H_ | 5 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_SYNC_WORKER_H_ |
6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_SYNC_WORKER_H_ | 6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_SYNC_WORKER_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
13 #include "base/observer_list.h" | 13 #include "base/observer_list.h" |
14 #include "chrome/browser/drive/drive_notification_observer.h" | 14 #include "chrome/browser/drive/drive_notification_observer.h" |
15 #include "chrome/browser/drive/drive_service_interface.h" | 15 #include "chrome/browser/drive/drive_service_interface.h" |
16 #include "chrome/browser/sync_file_system/drive_backend/sync_task_manager.h" | 16 #include "chrome/browser/sync_file_system/drive_backend/sync_task_manager.h" |
17 #include "chrome/browser/sync_file_system/local_change_processor.h" | 17 #include "chrome/browser/sync_file_system/local_change_processor.h" |
18 #include "chrome/browser/sync_file_system/remote_file_sync_service.h" | 18 #include "chrome/browser/sync_file_system/remote_file_sync_service.h" |
19 #include "chrome/browser/sync_file_system/sync_action.h" | 19 #include "chrome/browser/sync_file_system/sync_action.h" |
20 #include "chrome/browser/sync_file_system/sync_direction.h" | 20 #include "chrome/browser/sync_file_system/sync_direction.h" |
| 21 #include "chrome/browser/sync_file_system/task_logger.h" |
21 #include "net/base/network_change_notifier.h" | 22 #include "net/base/network_change_notifier.h" |
22 | 23 |
23 class ExtensionServiceInterface; | 24 class ExtensionServiceInterface; |
24 | 25 |
25 namespace base { | 26 namespace base { |
26 class SequencedTaskRunner; | 27 class SequencedTaskRunner; |
27 } | 28 } |
28 | 29 |
29 namespace drive { | 30 namespace drive { |
30 class DriveServiceInterface; | 31 class DriveServiceInterface; |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 leveldb::Env* env_override); | 82 leveldb::Env* env_override); |
82 | 83 |
83 virtual ~SyncWorker(); | 84 virtual ~SyncWorker(); |
84 | 85 |
85 void Initialize(); | 86 void Initialize(); |
86 | 87 |
87 // SyncTaskManager::Client overrides | 88 // SyncTaskManager::Client overrides |
88 virtual void MaybeScheduleNextTask() OVERRIDE; | 89 virtual void MaybeScheduleNextTask() OVERRIDE; |
89 virtual void NotifyLastOperationStatus( | 90 virtual void NotifyLastOperationStatus( |
90 SyncStatusCode sync_status, bool used_network) OVERRIDE; | 91 SyncStatusCode sync_status, bool used_network) OVERRIDE; |
| 92 virtual void RecordTaskLog(scoped_ptr<TaskLogger::TaskLog> task_log) OVERRIDE; |
91 | 93 |
92 void RegisterOrigin(const GURL& origin, const SyncStatusCallback& callback); | 94 void RegisterOrigin(const GURL& origin, const SyncStatusCallback& callback); |
93 void EnableOrigin(const GURL& origin, const SyncStatusCallback& callback); | 95 void EnableOrigin(const GURL& origin, const SyncStatusCallback& callback); |
94 void DisableOrigin(const GURL& origin, const SyncStatusCallback& callback); | 96 void DisableOrigin(const GURL& origin, const SyncStatusCallback& callback); |
95 void UninstallOrigin( | 97 void UninstallOrigin( |
96 const GURL& origin, | 98 const GURL& origin, |
97 RemoteFileSyncService::UninstallFlag flag, | 99 RemoteFileSyncService::UninstallFlag flag, |
98 const SyncStatusCallback& callback); | 100 const SyncStatusCallback& callback); |
99 void ProcessRemoteChange(const SyncFileCallback& callback); | 101 void ProcessRemoteChange(const SyncFileCallback& callback); |
100 void SetRemoteChangeProcessor( | 102 void SetRemoteChangeProcessor( |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 ObserverList<Observer> observers_; | 198 ObserverList<Observer> observers_; |
197 | 199 |
198 base::WeakPtrFactory<SyncWorker> weak_ptr_factory_; | 200 base::WeakPtrFactory<SyncWorker> weak_ptr_factory_; |
199 DISALLOW_COPY_AND_ASSIGN(SyncWorker); | 201 DISALLOW_COPY_AND_ASSIGN(SyncWorker); |
200 }; | 202 }; |
201 | 203 |
202 } // namespace drive_backend | 204 } // namespace drive_backend |
203 } // namespace sync_file_system | 205 } // namespace sync_file_system |
204 | 206 |
205 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_SYNC_WORKER_H_ | 207 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_SYNC_WORKER_H_ |
OLD | NEW |