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_GLUE_SYNC_BACKEND_HOST_CORE_H_ | 5 #ifndef CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_CORE_H_ |
6 #define CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_CORE_H_ | 6 #define CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_CORE_H_ |
7 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 | 9 |
10 #include "base/timer/timer.h" | 10 #include "base/timer/timer.h" |
(...skipping 18 matching lines...) Expand all Loading... | |
29 const scoped_refptr<syncer::ExtensionsActivity>& extensions_activity, | 29 const scoped_refptr<syncer::ExtensionsActivity>& extensions_activity, |
30 const syncer::WeakHandle<syncer::JsEventHandler>& event_handler, | 30 const syncer::WeakHandle<syncer::JsEventHandler>& event_handler, |
31 const GURL& service_url, | 31 const GURL& service_url, |
32 scoped_ptr<syncer::HttpPostProviderFactory> http_bridge_factory, | 32 scoped_ptr<syncer::HttpPostProviderFactory> http_bridge_factory, |
33 const syncer::SyncCredentials& credentials, | 33 const syncer::SyncCredentials& credentials, |
34 const std::string& invalidator_client_id, | 34 const std::string& invalidator_client_id, |
35 scoped_ptr<syncer::SyncManagerFactory> sync_manager_factory, | 35 scoped_ptr<syncer::SyncManagerFactory> sync_manager_factory, |
36 bool delete_sync_data_folder, | 36 bool delete_sync_data_folder, |
37 const std::string& restored_key_for_bootstrapping, | 37 const std::string& restored_key_for_bootstrapping, |
38 const std::string& restored_keystore_key_for_bootstrapping, | 38 const std::string& restored_keystore_key_for_bootstrapping, |
39 scoped_ptr<syncer::InternalComponentsFactory> | 39 scoped_ptr<syncer::InternalComponentsFactory> internal_components_factory, |
40 internal_components_factory, | 40 scoped_ptr<syncer::UnrecoverableErrorHandler> unrecoverable_error_handler, |
41 scoped_ptr<syncer::UnrecoverableErrorHandler> | |
42 unrecoverable_error_handler, | |
43 syncer::ReportUnrecoverableErrorFunction | 41 syncer::ReportUnrecoverableErrorFunction |
44 report_unrecoverable_error_function); | 42 report_unrecoverable_error_function, |
43 const std::string& signin_scoped_device_id); | |
45 ~DoInitializeOptions(); | 44 ~DoInitializeOptions(); |
46 | 45 |
47 base::MessageLoop* sync_loop; | 46 base::MessageLoop* sync_loop; |
48 SyncBackendRegistrar* registrar; | 47 SyncBackendRegistrar* registrar; |
49 syncer::ModelSafeRoutingInfo routing_info; | 48 syncer::ModelSafeRoutingInfo routing_info; |
50 std::vector<scoped_refptr<syncer::ModelSafeWorker> > workers; | 49 std::vector<scoped_refptr<syncer::ModelSafeWorker> > workers; |
51 scoped_refptr<syncer::ExtensionsActivity> extensions_activity; | 50 scoped_refptr<syncer::ExtensionsActivity> extensions_activity; |
52 syncer::WeakHandle<syncer::JsEventHandler> event_handler; | 51 syncer::WeakHandle<syncer::JsEventHandler> event_handler; |
53 GURL service_url; | 52 GURL service_url; |
54 // Overridden by tests. | 53 // Overridden by tests. |
55 scoped_ptr<syncer::HttpPostProviderFactory> http_bridge_factory; | 54 scoped_ptr<syncer::HttpPostProviderFactory> http_bridge_factory; |
56 syncer::SyncCredentials credentials; | 55 syncer::SyncCredentials credentials; |
57 const std::string invalidator_client_id; | 56 const std::string invalidator_client_id; |
58 scoped_ptr<syncer::SyncManagerFactory> sync_manager_factory; | 57 scoped_ptr<syncer::SyncManagerFactory> sync_manager_factory; |
59 std::string lsid; | 58 std::string lsid; |
60 bool delete_sync_data_folder; | 59 bool delete_sync_data_folder; |
61 std::string restored_key_for_bootstrapping; | 60 std::string restored_key_for_bootstrapping; |
62 std::string restored_keystore_key_for_bootstrapping; | 61 std::string restored_keystore_key_for_bootstrapping; |
63 scoped_ptr<syncer::InternalComponentsFactory> internal_components_factory; | 62 scoped_ptr<syncer::InternalComponentsFactory> internal_components_factory; |
64 scoped_ptr<syncer::UnrecoverableErrorHandler> unrecoverable_error_handler; | 63 scoped_ptr<syncer::UnrecoverableErrorHandler> unrecoverable_error_handler; |
65 syncer::ReportUnrecoverableErrorFunction | 64 syncer::ReportUnrecoverableErrorFunction |
66 report_unrecoverable_error_function; | 65 report_unrecoverable_error_function; |
66 std::string signin_scoped_device_id; | |
67 }; | 67 }; |
68 | 68 |
69 // Helper struct to handle currying params to | 69 // Helper struct to handle currying params to |
70 // SyncBackendHost::Core::DoConfigureSyncer. | 70 // SyncBackendHost::Core::DoConfigureSyncer. |
71 struct DoConfigureSyncerTypes { | 71 struct DoConfigureSyncerTypes { |
72 DoConfigureSyncerTypes(); | 72 DoConfigureSyncerTypes(); |
73 ~DoConfigureSyncerTypes(); | 73 ~DoConfigureSyncerTypes(); |
74 syncer::ModelTypeSet to_download; | 74 syncer::ModelTypeSet to_download; |
75 syncer::ModelTypeSet to_purge; | 75 syncer::ModelTypeSet to_purge; |
76 syncer::ModelTypeSet to_journal; | 76 syncer::ModelTypeSet to_journal; |
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
315 // Matches the value of SyncPref's HasSyncSetupCompleted() flag at init time. | 315 // Matches the value of SyncPref's HasSyncSetupCompleted() flag at init time. |
316 // Should not be used for anything except for UMAs and logging. | 316 // Should not be used for anything except for UMAs and logging. |
317 const bool has_sync_setup_completed_; | 317 const bool has_sync_setup_completed_; |
318 | 318 |
319 // Set when we've been asked to forward sync protocol events to the frontend. | 319 // Set when we've been asked to forward sync protocol events to the frontend. |
320 bool forward_protocol_events_; | 320 bool forward_protocol_events_; |
321 | 321 |
322 // Set when the forwarding of per-type debug counters is enabled. | 322 // Set when the forwarding of per-type debug counters is enabled. |
323 bool forward_type_info_; | 323 bool forward_type_info_; |
324 | 324 |
325 std::string signin_scoped_device_id_; | |
rlarocque
2014/07/16 00:44:31
nit: Comment this member.
pavely
2014/07/16 21:35:59
Done.
| |
326 | |
325 base::WeakPtrFactory<SyncBackendHostCore> weak_ptr_factory_; | 327 base::WeakPtrFactory<SyncBackendHostCore> weak_ptr_factory_; |
326 | 328 |
327 DISALLOW_COPY_AND_ASSIGN(SyncBackendHostCore); | 329 DISALLOW_COPY_AND_ASSIGN(SyncBackendHostCore); |
328 }; | 330 }; |
329 | 331 |
330 } // namespace browser_sync | 332 } // namespace browser_sync |
331 | 333 |
332 #endif // CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_CORE_H_ | 334 #endif // CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_CORE_H_ |
OLD | NEW |