OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_H_ | 5 #ifndef CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_H_ |
6 #define CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_H_ | 6 #define CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/callback.h" | 11 #include "base/callback.h" |
12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
15 #include "base/memory/weak_ptr.h" | 15 #include "base/memory/weak_ptr.h" |
16 #include "base/threading/thread.h" | 16 #include "base/threading/thread.h" |
| 17 #include "chrome/browser/invalidation/invalidation_service.h" |
17 #include "chrome/browser/sync/glue/backend_data_type_configurer.h" | 18 #include "chrome/browser/sync/glue/backend_data_type_configurer.h" |
18 #include "chrome/browser/sync/glue/chrome_extensions_activity_monitor.h" | 19 #include "chrome/browser/sync/glue/chrome_extensions_activity_monitor.h" |
19 #include "content/public/browser/notification_observer.h" | 20 #include "content/public/browser/notification_observer.h" |
20 #include "content/public/browser/notification_registrar.h" | 21 #include "content/public/browser/notification_registrar.h" |
21 #include "google_apis/gaia/google_service_auth_error.h" | 22 #include "google_apis/gaia/google_service_auth_error.h" |
22 #include "googleurl/src/gurl.h" | 23 #include "googleurl/src/gurl.h" |
23 #include "sync/internal_api/public/base/model_type.h" | 24 #include "sync/internal_api/public/base/model_type.h" |
24 #include "sync/internal_api/public/configure_reason.h" | 25 #include "sync/internal_api/public/configure_reason.h" |
25 #include "sync/internal_api/public/engine/model_safe_worker.h" | 26 #include "sync/internal_api/public/engine/model_safe_worker.h" |
26 #include "sync/internal_api/public/sessions/sync_session_snapshot.h" | 27 #include "sync/internal_api/public/sessions/sync_session_snapshot.h" |
27 #include "sync/internal_api/public/sync_encryption_handler.h" | 28 #include "sync/internal_api/public/sync_encryption_handler.h" |
28 #include "sync/internal_api/public/sync_manager.h" | 29 #include "sync/internal_api/public/sync_manager.h" |
29 #include "sync/internal_api/public/util/report_unrecoverable_error_function.h" | 30 #include "sync/internal_api/public/util/report_unrecoverable_error_function.h" |
30 #include "sync/internal_api/public/util/unrecoverable_error_handler.h" | 31 #include "sync/internal_api/public/util/unrecoverable_error_handler.h" |
31 #include "sync/internal_api/public/util/weak_handle.h" | 32 #include "sync/internal_api/public/util/weak_handle.h" |
32 #include "sync/notifier/invalidation_handler.h" | 33 #include "sync/notifier/invalidation_handler.h" |
33 #include "sync/notifier/invalidator_factory.h" | |
34 #include "sync/protocol/encryption.pb.h" | 34 #include "sync/protocol/encryption.pb.h" |
35 #include "sync/protocol/sync_protocol_error.h" | 35 #include "sync/protocol/sync_protocol_error.h" |
36 | 36 |
37 class Profile; | 37 class Profile; |
38 | 38 |
39 namespace base { | 39 namespace base { |
40 class MessageLoop; | 40 class MessageLoop; |
41 } | 41 } |
42 | 42 |
43 namespace syncer { | 43 namespace syncer { |
44 class SyncManagerFactory; | 44 class SyncManagerFactory; |
45 } | 45 } |
46 | 46 |
47 namespace invalidation { | |
48 class InvalidatorStorage; | |
49 } | |
50 | |
51 namespace browser_sync { | 47 namespace browser_sync { |
52 | 48 |
53 class AndroidInvalidatorBridge; | |
54 class ChangeProcessor; | 49 class ChangeProcessor; |
| 50 class InvalidatorStorage; |
55 class SyncBackendRegistrar; | 51 class SyncBackendRegistrar; |
56 class SyncPrefs; | 52 class SyncPrefs; |
57 class SyncedDeviceTracker; | 53 class SyncedDeviceTracker; |
58 struct Experiments; | 54 struct Experiments; |
59 | 55 |
60 // SyncFrontend is the interface used by SyncBackendHost to communicate with | 56 // SyncFrontend is the interface used by SyncBackendHost to communicate with |
61 // the entity that created it and, presumably, is interested in sync-related | 57 // the entity that created it and, presumably, is interested in sync-related |
62 // activity. | 58 // activity. |
63 // NOTE: All methods will be invoked by a SyncBackendHost on the same thread | 59 // NOTE: All methods will be invoked by a SyncBackendHost on the same thread |
64 // used to create that SyncBackendHost. | 60 // used to create that SyncBackendHost. |
65 class SyncFrontend : public syncer::InvalidationHandler { | 61 class SyncFrontend { |
66 public: | 62 public: |
67 SyncFrontend() {} | 63 SyncFrontend() {} |
68 | 64 |
69 // The backend has completed initialization and it is now ready to | 65 // The backend has completed initialization and it is now ready to |
70 // accept and process changes. If success is false, initialization | 66 // accept and process changes. If success is false, initialization |
71 // wasn't able to be completed and should be retried. | 67 // wasn't able to be completed and should be retried. |
72 // | 68 // |
73 // |js_backend| is what about:sync interacts with; it's different | 69 // |js_backend| is what about:sync interacts with; it's different |
74 // from the 'Backend' in 'OnBackendInitialized' (unfortunately). It | 70 // from the 'Backend' in 'OnBackendInitialized' (unfortunately). It |
75 // is initialized only if |success| is true. | 71 // is initialized only if |success| is true. |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 private: | 142 private: |
147 DISALLOW_COPY_AND_ASSIGN(SyncFrontend); | 143 DISALLOW_COPY_AND_ASSIGN(SyncFrontend); |
148 }; | 144 }; |
149 | 145 |
150 // A UI-thread safe API into the sync backend that "hosts" the top-level | 146 // A UI-thread safe API into the sync backend that "hosts" the top-level |
151 // syncapi element, the SyncManager, on its own thread. This class handles | 147 // syncapi element, the SyncManager, on its own thread. This class handles |
152 // dispatch of potentially blocking calls to appropriate threads and ensures | 148 // dispatch of potentially blocking calls to appropriate threads and ensures |
153 // that the SyncFrontend is only accessed on the UI loop. | 149 // that the SyncFrontend is only accessed on the UI loop. |
154 class SyncBackendHost | 150 class SyncBackendHost |
155 : public BackendDataTypeConfigurer, | 151 : public BackendDataTypeConfigurer, |
156 public content::NotificationObserver { | 152 public content::NotificationObserver, |
| 153 public syncer::InvalidationHandler { |
157 public: | 154 public: |
158 typedef syncer::SyncStatus Status; | 155 typedef syncer::SyncStatus Status; |
159 | 156 |
160 // Create a SyncBackendHost with a reference to the |frontend| that | 157 // Create a SyncBackendHost with a reference to the |frontend| that |
161 // it serves and communicates to via the SyncFrontend interface (on | 158 // it serves and communicates to via the SyncFrontend interface (on |
162 // the same thread it used to call the constructor). Must outlive | 159 // the same thread it used to call the constructor). Must outlive |
163 // |sync_prefs| and |invalidator_storage|. | 160 // |sync_prefs| and |invalidator_storage|. |
164 SyncBackendHost( | 161 SyncBackendHost( |
165 const std::string& name, | 162 const std::string& name, |
166 Profile* profile, | 163 Profile* profile, |
167 const base::WeakPtr<SyncPrefs>& sync_prefs, | 164 const base::WeakPtr<SyncPrefs>& sync_prefs); |
168 // TODO(tim): Temporary, remove when bug 124137 finished. | |
169 const base::WeakPtr<invalidation::InvalidatorStorage>& | |
170 invalidator_storage); | |
171 | 165 |
172 // For testing. | 166 // For testing. |
173 // TODO(skrul): Extract an interface so this is not needed. | 167 // TODO(skrul): Extract an interface so this is not needed. |
174 explicit SyncBackendHost(Profile* profile); | 168 explicit SyncBackendHost(Profile* profile); |
175 virtual ~SyncBackendHost(); | 169 virtual ~SyncBackendHost(); |
176 | 170 |
177 // Called on |frontend_loop_| to kick off asynchronous initialization. | 171 // Called on |frontend_loop_| to kick off asynchronous initialization. |
178 // As a fallback when no cached auth information is available, try to | 172 // As a fallback when no cached auth information is available, try to |
179 // bootstrap authentication using |lsid|, if it isn't empty. | 173 // bootstrap authentication using |lsid|, if it isn't empty. |
180 // Optionally delete the Sync Data folder (if it's corrupt). | 174 // Optionally delete the Sync Data folder (if it's corrupt). |
181 // |report_unrecoverable_error_function| can be NULL. | 175 // |report_unrecoverable_error_function| can be NULL. |
182 // Note: |unrecoverable_error_handler| may be invoked from any thread. | 176 // Note: |unrecoverable_error_handler| may be invoked from any thread. |
183 void Initialize( | 177 void Initialize( |
184 SyncFrontend* frontend, | 178 SyncFrontend* frontend, |
185 const syncer::WeakHandle<syncer::JsEventHandler>& event_handler, | 179 const syncer::WeakHandle<syncer::JsEventHandler>& event_handler, |
186 const GURL& service_url, | 180 const GURL& service_url, |
187 const syncer::SyncCredentials& credentials, | 181 const syncer::SyncCredentials& credentials, |
188 bool delete_sync_data_folder, | 182 bool delete_sync_data_folder, |
189 syncer::SyncManagerFactory* sync_manager_factory, | 183 syncer::SyncManagerFactory* sync_manager_factory, |
190 syncer::UnrecoverableErrorHandler* unrecoverable_error_handler, | 184 syncer::UnrecoverableErrorHandler* unrecoverable_error_handler, |
191 syncer::ReportUnrecoverableErrorFunction | 185 syncer::ReportUnrecoverableErrorFunction |
192 report_unrecoverable_error_function); | 186 report_unrecoverable_error_function); |
193 | 187 |
194 // Called on |frontend_loop| to update SyncCredentials. | 188 // Called on |frontend_loop| to update SyncCredentials. |
195 virtual void UpdateCredentials(const syncer::SyncCredentials& credentials); | 189 virtual void UpdateCredentials(const syncer::SyncCredentials& credentials); |
196 | 190 |
197 // Registers the underlying frontend for the given IDs to the underlying | |
198 // notifier. This lasts until StopSyncingForShutdown() is called. | |
199 void UpdateRegisteredInvalidationIds(const syncer::ObjectIdSet& ids); | |
200 | |
201 // Forwards an invalidation acknowledgement to the underlying notifier. | |
202 void AcknowledgeInvalidation(const invalidation::ObjectId& id, | |
203 const syncer::AckHandle& ack_handle); | |
204 | |
205 // This starts the SyncerThread running a Syncer object to communicate with | 191 // This starts the SyncerThread running a Syncer object to communicate with |
206 // sync servers. Until this is called, no changes will leave or enter this | 192 // sync servers. Until this is called, no changes will leave or enter this |
207 // browser from the cloud / sync servers. | 193 // browser from the cloud / sync servers. |
208 // Called on |frontend_loop_|. | 194 // Called on |frontend_loop_|. |
209 virtual void StartSyncingWithServer(); | 195 virtual void StartSyncingWithServer(); |
210 | 196 |
211 // Called on |frontend_loop_| to asynchronously set a new passphrase for | 197 // Called on |frontend_loop_| to asynchronously set a new passphrase for |
212 // encryption. Note that it is an error to call SetEncryptionPassphrase under | 198 // encryption. Note that it is an error to call SetEncryptionPassphrase under |
213 // the following circumstances: | 199 // the following circumstances: |
214 // - An explicit passphrase has already been set | 200 // - An explicit passphrase has already been set |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 DoInitializeOptions( | 304 DoInitializeOptions( |
319 base::MessageLoop* sync_loop, | 305 base::MessageLoop* sync_loop, |
320 SyncBackendRegistrar* registrar, | 306 SyncBackendRegistrar* registrar, |
321 const syncer::ModelSafeRoutingInfo& routing_info, | 307 const syncer::ModelSafeRoutingInfo& routing_info, |
322 const std::vector<syncer::ModelSafeWorker*>& workers, | 308 const std::vector<syncer::ModelSafeWorker*>& workers, |
323 syncer::ExtensionsActivityMonitor* extensions_activity_monitor, | 309 syncer::ExtensionsActivityMonitor* extensions_activity_monitor, |
324 const syncer::WeakHandle<syncer::JsEventHandler>& event_handler, | 310 const syncer::WeakHandle<syncer::JsEventHandler>& event_handler, |
325 const GURL& service_url, | 311 const GURL& service_url, |
326 MakeHttpBridgeFactoryFn make_http_bridge_factory_fn, | 312 MakeHttpBridgeFactoryFn make_http_bridge_factory_fn, |
327 const syncer::SyncCredentials& credentials, | 313 const syncer::SyncCredentials& credentials, |
328 AndroidInvalidatorBridge* android_invalidator_bridge, | 314 const std::string& invalidator_client_id, |
329 syncer::InvalidatorFactory* invalidator_factory, | |
330 syncer::SyncManagerFactory* sync_manager_factory, | 315 syncer::SyncManagerFactory* sync_manager_factory, |
331 bool delete_sync_data_folder, | 316 bool delete_sync_data_folder, |
332 const std::string& restored_key_for_bootstrapping, | 317 const std::string& restored_key_for_bootstrapping, |
333 const std::string& restored_keystore_key_for_bootstrapping, | 318 const std::string& restored_keystore_key_for_bootstrapping, |
334 syncer::InternalComponentsFactory* internal_components_factory, | 319 syncer::InternalComponentsFactory* internal_components_factory, |
335 syncer::UnrecoverableErrorHandler* unrecoverable_error_handler, | 320 syncer::UnrecoverableErrorHandler* unrecoverable_error_handler, |
336 syncer::ReportUnrecoverableErrorFunction | 321 syncer::ReportUnrecoverableErrorFunction |
337 report_unrecoverable_error_function, | 322 report_unrecoverable_error_function, |
338 bool use_oauth2_token); | 323 bool use_oauth2_token); |
339 ~DoInitializeOptions(); | 324 ~DoInitializeOptions(); |
340 | 325 |
341 base::MessageLoop* sync_loop; | 326 base::MessageLoop* sync_loop; |
342 SyncBackendRegistrar* registrar; | 327 SyncBackendRegistrar* registrar; |
343 syncer::ModelSafeRoutingInfo routing_info; | 328 syncer::ModelSafeRoutingInfo routing_info; |
344 std::vector<syncer::ModelSafeWorker*> workers; | 329 std::vector<syncer::ModelSafeWorker*> workers; |
345 syncer::ExtensionsActivityMonitor* extensions_activity_monitor; | 330 syncer::ExtensionsActivityMonitor* extensions_activity_monitor; |
346 syncer::WeakHandle<syncer::JsEventHandler> event_handler; | 331 syncer::WeakHandle<syncer::JsEventHandler> event_handler; |
347 GURL service_url; | 332 GURL service_url; |
348 // Overridden by tests. | 333 // Overridden by tests. |
349 MakeHttpBridgeFactoryFn make_http_bridge_factory_fn; | 334 MakeHttpBridgeFactoryFn make_http_bridge_factory_fn; |
350 syncer::SyncCredentials credentials; | 335 syncer::SyncCredentials credentials; |
351 AndroidInvalidatorBridge* const android_invalidator_bridge; | 336 const std::string invalidator_client_id; |
352 syncer::InvalidatorFactory* const invalidator_factory; | |
353 syncer::SyncManagerFactory* const sync_manager_factory; | 337 syncer::SyncManagerFactory* const sync_manager_factory; |
354 std::string lsid; | 338 std::string lsid; |
355 bool delete_sync_data_folder; | 339 bool delete_sync_data_folder; |
356 std::string restored_key_for_bootstrapping; | 340 std::string restored_key_for_bootstrapping; |
357 std::string restored_keystore_key_for_bootstrapping; | 341 std::string restored_keystore_key_for_bootstrapping; |
358 syncer::InternalComponentsFactory* internal_components_factory; | 342 syncer::InternalComponentsFactory* internal_components_factory; |
359 syncer::UnrecoverableErrorHandler* unrecoverable_error_handler; | 343 syncer::UnrecoverableErrorHandler* unrecoverable_error_handler; |
360 syncer::ReportUnrecoverableErrorFunction | 344 syncer::ReportUnrecoverableErrorFunction |
361 report_unrecoverable_error_function; | 345 report_unrecoverable_error_function; |
362 bool use_oauth2_token; | 346 bool use_oauth2_token; |
(...skipping 10 matching lines...) Expand all Loading... |
373 syncer::ModelTypeSet to_journal, | 357 syncer::ModelTypeSet to_journal, |
374 syncer::ModelTypeSet to_unapply, | 358 syncer::ModelTypeSet to_unapply, |
375 syncer::ModelTypeSet to_ignore, | 359 syncer::ModelTypeSet to_ignore, |
376 const syncer::ModelSafeRoutingInfo& routing_info, | 360 const syncer::ModelSafeRoutingInfo& routing_info, |
377 const base::Callback<void(syncer::ModelTypeSet, | 361 const base::Callback<void(syncer::ModelTypeSet, |
378 syncer::ModelTypeSet)>& ready_task, | 362 syncer::ModelTypeSet)>& ready_task, |
379 const base::Closure& retry_callback); | 363 const base::Closure& retry_callback); |
380 | 364 |
381 // Called when the syncer has finished performing a configuration. | 365 // Called when the syncer has finished performing a configuration. |
382 void FinishConfigureDataTypesOnFrontendLoop( | 366 void FinishConfigureDataTypesOnFrontendLoop( |
| 367 const syncer::ModelTypeSet enabled_types, |
383 const syncer::ModelTypeSet succeeded_configuration_types, | 368 const syncer::ModelTypeSet succeeded_configuration_types, |
384 const syncer::ModelTypeSet failed_configuration_types, | 369 const syncer::ModelTypeSet failed_configuration_types, |
385 const base::Callback<void(syncer::ModelTypeSet, | 370 const base::Callback<void(syncer::ModelTypeSet, |
386 syncer::ModelTypeSet)>& ready_task); | 371 syncer::ModelTypeSet)>& ready_task); |
387 | 372 |
388 // Called when the SyncManager has been constructed and initialized. | 373 // Called when the SyncManager has been constructed and initialized. |
389 // Stores |js_backend| and |debug_info_listener| on the UI thread for | 374 // Stores |js_backend| and |debug_info_listener| on the UI thread for |
390 // consumption when initialization is complete. | 375 // consumption when initialization is complete. |
391 virtual void HandleSyncManagerInitializationOnFrontendLoop( | 376 virtual void HandleSyncManagerInitializationOnFrontendLoop( |
392 const syncer::WeakHandle<syncer::JsBackend>& js_backend, | 377 const syncer::WeakHandle<syncer::JsBackend>& js_backend, |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
505 syncer::InvalidatorState state); | 490 syncer::InvalidatorState state); |
506 void HandleIncomingInvalidationOnFrontendLoop( | 491 void HandleIncomingInvalidationOnFrontendLoop( |
507 const syncer::ObjectIdInvalidationMap& invalidation_map); | 492 const syncer::ObjectIdInvalidationMap& invalidation_map); |
508 | 493 |
509 // NotificationObserver implementation. | 494 // NotificationObserver implementation. |
510 virtual void Observe( | 495 virtual void Observe( |
511 int type, | 496 int type, |
512 const content::NotificationSource& source, | 497 const content::NotificationSource& source, |
513 const content::NotificationDetails& details) OVERRIDE; | 498 const content::NotificationDetails& details) OVERRIDE; |
514 | 499 |
| 500 // InvalidationHandler implementation. |
| 501 virtual void OnInvalidatorStateChange( |
| 502 syncer::InvalidatorState state) OVERRIDE; |
| 503 virtual void OnIncomingInvalidation( |
| 504 const syncer::ObjectIdInvalidationMap& invalidation_map) OVERRIDE; |
| 505 |
515 // Handles stopping the core's SyncManager, accounting for whether | 506 // Handles stopping the core's SyncManager, accounting for whether |
516 // initialization is done yet. | 507 // initialization is done yet. |
517 void StopSyncManagerForShutdown(const base::Closure& closure); | 508 void StopSyncManagerForShutdown(const base::Closure& closure); |
518 | 509 |
519 base::WeakPtrFactory<SyncBackendHost> weak_ptr_factory_; | 510 base::WeakPtrFactory<SyncBackendHost> weak_ptr_factory_; |
520 | 511 |
521 content::NotificationRegistrar notification_registrar_; | 512 content::NotificationRegistrar notification_registrar_; |
522 | 513 |
523 // A thread where all the sync operations happen. | 514 // A thread where all the sync operations happen. |
524 base::Thread sync_thread_; | 515 base::Thread sync_thread_; |
525 | 516 |
526 // A reference to the MessageLoop used to construct |this|, so we know how | 517 // A reference to the MessageLoop used to construct |this|, so we know how |
527 // to safely talk back to the SyncFrontend. | 518 // to safely talk back to the SyncFrontend. |
528 base::MessageLoop* const frontend_loop_; | 519 base::MessageLoop* const frontend_loop_; |
529 | 520 |
530 Profile* const profile_; | 521 Profile* const profile_; |
531 | 522 |
532 // Name used for debugging (set from profile_->GetDebugName()). | 523 // Name used for debugging (set from profile_->GetDebugName()). |
533 const std::string name_; | 524 const std::string name_; |
534 | 525 |
535 // Our core, which communicates directly to the syncapi. | 526 // Our core, which communicates directly to the syncapi. |
536 scoped_refptr<Core> core_; | 527 scoped_refptr<Core> core_; |
537 | 528 |
538 InitializationState initialization_state_; | 529 InitializationState initialization_state_; |
539 | 530 |
540 const base::WeakPtr<SyncPrefs> sync_prefs_; | 531 const base::WeakPtr<SyncPrefs> sync_prefs_; |
541 | 532 |
542 scoped_ptr<AndroidInvalidatorBridge> android_invalidator_bridge_; | |
543 | |
544 syncer::InvalidatorFactory invalidator_factory_; | |
545 | |
546 ChromeExtensionsActivityMonitor extensions_activity_monitor_; | 533 ChromeExtensionsActivityMonitor extensions_activity_monitor_; |
547 | 534 |
548 scoped_ptr<SyncBackendRegistrar> registrar_; | 535 scoped_ptr<SyncBackendRegistrar> registrar_; |
549 | 536 |
550 // The frontend which we serve (and are owned by). | 537 // The frontend which we serve (and are owned by). |
551 SyncFrontend* frontend_; | 538 SyncFrontend* frontend_; |
552 | 539 |
553 // We cache the cryptographer's pending keys whenever NotifyPassphraseRequired | 540 // We cache the cryptographer's pending keys whenever NotifyPassphraseRequired |
554 // is called. This way, before the UI calls SetDecryptionPassphrase on the | 541 // is called. This way, before the UI calls SetDecryptionPassphrase on the |
555 // syncer, it can avoid the overhead of an asynchronous decryption call and | 542 // syncer, it can avoid the overhead of an asynchronous decryption call and |
(...skipping 17 matching lines...) Expand all Loading... |
573 // UI-thread cache of the last SyncSessionSnapshot received from syncapi. | 560 // UI-thread cache of the last SyncSessionSnapshot received from syncapi. |
574 syncer::sessions::SyncSessionSnapshot last_snapshot_; | 561 syncer::sessions::SyncSessionSnapshot last_snapshot_; |
575 | 562 |
576 // Temporary holder of sync manager's initialization results. Set by | 563 // Temporary holder of sync manager's initialization results. Set by |
577 // HandleSyncManagerInitializationOnFrontendLoop, and consumed when we pass | 564 // HandleSyncManagerInitializationOnFrontendLoop, and consumed when we pass |
578 // it via OnBackendInitialized in the final state of | 565 // it via OnBackendInitialized in the final state of |
579 // HandleInitializationCompletedOnFrontendLoop. | 566 // HandleInitializationCompletedOnFrontendLoop. |
580 syncer::WeakHandle<syncer::JsBackend> js_backend_; | 567 syncer::WeakHandle<syncer::JsBackend> js_backend_; |
581 syncer::WeakHandle<syncer::DataTypeDebugInfoListener> debug_info_listener_; | 568 syncer::WeakHandle<syncer::DataTypeDebugInfoListener> debug_info_listener_; |
582 | 569 |
| 570 invalidation::InvalidationService* invalidator_; |
| 571 |
583 DISALLOW_COPY_AND_ASSIGN(SyncBackendHost); | 572 DISALLOW_COPY_AND_ASSIGN(SyncBackendHost); |
584 }; | 573 }; |
585 | 574 |
586 } // namespace browser_sync | 575 } // namespace browser_sync |
587 | 576 |
588 #endif // CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_H_ | 577 #endif // CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_H_ |
OLD | NEW |