Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(245)

Side by Side Diff: chrome/browser/sync_file_system/drive_backend/sync_engine.h

Issue 288193002: [SyncFS] Construct and destruct sync_worker in worker_task_runner (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 60
61 static scoped_ptr<SyncEngine> CreateForBrowserContext( 61 static scoped_ptr<SyncEngine> CreateForBrowserContext(
62 content::BrowserContext* context); 62 content::BrowserContext* context);
63 static void AppendDependsOnFactories( 63 static void AppendDependsOnFactories(
64 std::set<BrowserContextKeyedServiceFactory*>* factories); 64 std::set<BrowserContextKeyedServiceFactory*>* factories);
65 65
66 virtual ~SyncEngine(); 66 virtual ~SyncEngine();
67 67
68 void Initialize(const base::FilePath& base_dir, 68 void Initialize(const base::FilePath& base_dir,
69 base::SequencedTaskRunner* file_task_runner, 69 base::SequencedTaskRunner* file_task_runner,
70 const base::Closure& closure,
70 leveldb::Env* env_override); 71 leveldb::Env* env_override);
71 72
72 // RemoteFileSyncService overrides. 73 // RemoteFileSyncService overrides.
73 virtual void AddServiceObserver(SyncServiceObserver* observer) OVERRIDE; 74 virtual void AddServiceObserver(SyncServiceObserver* observer) OVERRIDE;
74 virtual void AddFileStatusObserver(FileStatusObserver* observer) OVERRIDE; 75 virtual void AddFileStatusObserver(FileStatusObserver* observer) OVERRIDE;
75 virtual void RegisterOrigin( 76 virtual void RegisterOrigin(
76 const GURL& origin, 77 const GURL& origin,
77 const SyncStatusCallback& callback) OVERRIDE; 78 const SyncStatusCallback& callback) OVERRIDE;
78 virtual void EnableOrigin( 79 virtual void EnableOrigin(
79 const GURL& origin, 80 const GURL& origin,
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 friend class SyncEngineTest; 138 friend class SyncEngineTest;
138 139
139 SyncEngine(scoped_ptr<drive::DriveServiceInterface> drive_service, 140 SyncEngine(scoped_ptr<drive::DriveServiceInterface> drive_service,
140 scoped_ptr<drive::DriveUploaderInterface> drive_uploader, 141 scoped_ptr<drive::DriveUploaderInterface> drive_uploader,
141 base::SequencedTaskRunner* worker_task_runner, 142 base::SequencedTaskRunner* worker_task_runner,
142 drive::DriveNotificationManager* notification_manager, 143 drive::DriveNotificationManager* notification_manager,
143 ExtensionServiceInterface* extension_service, 144 ExtensionServiceInterface* extension_service,
144 SigninManagerBase* signin_manager); 145 SigninManagerBase* signin_manager);
145 146
146 void UpdateRegisteredApps(); 147 void UpdateRegisteredApps();
148 void SetSyncWorker(const base::Closure& closure,
149 scoped_ptr<SyncWorker> sync_worker);
147 150
148 scoped_ptr<drive::DriveServiceInterface> drive_service_; 151 scoped_ptr<drive::DriveServiceInterface> drive_service_;
149 scoped_ptr<DriveServiceWrapper> drive_service_wrapper_; 152 scoped_ptr<DriveServiceWrapper> drive_service_wrapper_;
150 scoped_ptr<drive::DriveUploaderInterface> drive_uploader_; 153 scoped_ptr<drive::DriveUploaderInterface> drive_uploader_;
151 scoped_ptr<DriveUploaderWrapper> drive_uploader_wrapper_; 154 scoped_ptr<DriveUploaderWrapper> drive_uploader_wrapper_;
152 RemoteChangeProcessor* remote_change_processor_; 155 RemoteChangeProcessor* remote_change_processor_;
153 scoped_ptr<RemoteChangeProcessorWrapper> remote_change_processor_wrapper_; 156 scoped_ptr<RemoteChangeProcessorWrapper> remote_change_processor_wrapper_;
154 157
155 scoped_ptr<RemoteChangeProcessorOnWorker> remote_change_processor_on_worker_; 158 scoped_ptr<RemoteChangeProcessorOnWorker> remote_change_processor_on_worker_;
156 159
(...skipping 15 matching lines...) Expand all
172 scoped_refptr<base::SequencedTaskRunner> worker_task_runner_; 175 scoped_refptr<base::SequencedTaskRunner> worker_task_runner_;
173 176
174 base::WeakPtrFactory<SyncEngine> weak_ptr_factory_; 177 base::WeakPtrFactory<SyncEngine> weak_ptr_factory_;
175 DISALLOW_COPY_AND_ASSIGN(SyncEngine); 178 DISALLOW_COPY_AND_ASSIGN(SyncEngine);
176 }; 179 };
177 180
178 } // namespace drive_backend 181 } // namespace drive_backend
179 } // namespace sync_file_system 182 } // namespace sync_file_system
180 183
181 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_SYNC_ENGINE_H_ 184 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_SYNC_ENGINE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698