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

Side by Side Diff: components/sync/driver/glue/sync_backend_host.h

Issue 2489433002: [Sync] Move thread checking into the ModelSafeWorker interface. (Closed)
Patch Set: Improve/add comments. Created 4 years, 1 month 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
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 COMPONENTS_SYNC_DRIVER_GLUE_SYNC_BACKEND_HOST_H_ 5 #ifndef COMPONENTS_SYNC_DRIVER_GLUE_SYNC_BACKEND_HOST_H_
6 #define COMPONENTS_SYNC_DRIVER_GLUE_SYNC_BACKEND_HOST_H_ 6 #define COMPONENTS_SYNC_DRIVER_GLUE_SYNC_BACKEND_HOST_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 53
54 // Called on the frontend's thread to kick off asynchronous initialization. 54 // Called on the frontend's thread to kick off asynchronous initialization.
55 // Optionally deletes the "Sync Data" folder during init in order to make 55 // Optionally deletes the "Sync Data" folder during init in order to make
56 // sure we're starting fresh. 56 // sure we're starting fresh.
57 // 57 //
58 // |saved_nigori_state| is optional nigori state to restore from a previous 58 // |saved_nigori_state| is optional nigori state to restore from a previous
59 // backend instance. May be null. 59 // backend instance. May be null.
60 virtual void Initialize( 60 virtual void Initialize(
61 SyncFrontend* frontend, 61 SyncFrontend* frontend,
62 base::Thread* sync_thread, 62 base::Thread* sync_thread,
63 const scoped_refptr<base::SingleThreadTaskRunner>& db_thread,
64 const scoped_refptr<base::SingleThreadTaskRunner>& file_thread,
65 const WeakHandle<JsEventHandler>& event_handler, 63 const WeakHandle<JsEventHandler>& event_handler,
66 const GURL& service_url, 64 const GURL& service_url,
67 const std::string& sync_user_agent, 65 const std::string& sync_user_agent,
68 const SyncCredentials& credentials, 66 const SyncCredentials& credentials,
69 bool delete_sync_data_folder, 67 bool delete_sync_data_folder,
70 bool enable_local_sync_backend, 68 bool enable_local_sync_backend,
71 const base::FilePath& local_sync_backend_folder, 69 const base::FilePath& local_sync_backend_folder,
72 std::unique_ptr<SyncManagerFactory> sync_manager_factory, 70 std::unique_ptr<SyncManagerFactory> sync_manager_factory,
73 const WeakHandle<UnrecoverableErrorHandler>& unrecoverable_error_handler, 71 const WeakHandle<UnrecoverableErrorHandler>& unrecoverable_error_handler,
74 const base::Closure& report_unrecoverable_error_function, 72 const base::Closure& report_unrecoverable_error_function,
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 // See SyncManager::OnCookieJarChanged. 203 // See SyncManager::OnCookieJarChanged.
206 virtual void OnCookieJarChanged(bool account_mismatch, bool empty_jar) = 0; 204 virtual void OnCookieJarChanged(bool account_mismatch, bool empty_jar) = 0;
207 205
208 private: 206 private:
209 DISALLOW_COPY_AND_ASSIGN(SyncBackendHost); 207 DISALLOW_COPY_AND_ASSIGN(SyncBackendHost);
210 }; 208 };
211 209
212 } // namespace syncer 210 } // namespace syncer
213 211
214 #endif // COMPONENTS_SYNC_DRIVER_GLUE_SYNC_BACKEND_HOST_H_ 212 #endif // COMPONENTS_SYNC_DRIVER_GLUE_SYNC_BACKEND_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698