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_PROFILE_SYNC_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ |
6 #define CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ | 6 #define CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
544 return configure_status_; | 544 return configure_status_; |
545 } | 545 } |
546 | 546 |
547 // If true, the ProfileSyncService has detected that a new GAIA signin has | 547 // If true, the ProfileSyncService has detected that a new GAIA signin has |
548 // succeeded, and is waiting for initialization to complete. This is used by | 548 // succeeded, and is waiting for initialization to complete. This is used by |
549 // the UI to differentiate between a new auth error (encountered as part of | 549 // the UI to differentiate between a new auth error (encountered as part of |
550 // the initialization process) and a pre-existing auth error that just hasn't | 550 // the initialization process) and a pre-existing auth error that just hasn't |
551 // been cleared yet. Virtual for testing purposes. | 551 // been cleared yet. Virtual for testing purposes. |
552 virtual bool waiting_for_auth() const; | 552 virtual bool waiting_for_auth() const; |
553 | 553 |
554 // Updates the set of ObjectIds associated with a given | 554 // Sets the invalidation handler for the given name. Pass in NULL |
msw
2012/08/03 23:30:46
nit: line breaks :)
akalin
2012/08/07 07:25:19
Done.
| |
555 // |handler|. Passing an empty ObjectIdSet will unregister | 555 // for |handler| if you want to remove the handler for the given |
556 // |handler|. There should be at most one handler registered per | 556 // name. (This doesn't unregister the IDs for the given name, |
557 // object id. | 557 // though.) A handler must be set for at most one name. |
558 // | 558 // |
559 // The handler -> registered ids map is persisted across restarts of | 559 // The handler name -> handler map is persisted across restarts of |
560 // sync. | 560 // sync. |
561 void UpdateRegisteredInvalidationIds(syncer::SyncNotifierObserver* handler, | 561 void SetInvalidationHandler(const std::string& handler_name, |
562 syncer::SyncNotifierObserver* handler); | |
563 | |
564 // Updates the set of ObjectIds associated with a given invalidation | |
msw
2012/08/03 23:30:46
nit: line breaks :)
akalin
2012/08/07 07:25:19
Done.
| |
565 // handler (via its name). An ID must be registered for at most one | |
566 // handler. | |
567 // | |
568 // The handler name -> registered ids map is persisted across | |
msw
2012/08/03 23:30:46
nit: line breaks :)
akalin
2012/08/07 07:25:19
Done.
| |
569 // restarts of sync. | |
570 void UpdateRegisteredInvalidationIds(const std::string& handler_name, | |
562 const syncer::ObjectIdSet& ids); | 571 const syncer::ObjectIdSet& ids); |
563 | 572 |
564 // ProfileKeyedService implementation. | 573 // ProfileKeyedService implementation. |
565 virtual void Shutdown() OVERRIDE; | 574 virtual void Shutdown() OVERRIDE; |
566 | 575 |
567 protected: | 576 protected: |
568 // Used by test classes that derive from ProfileSyncService. | 577 // Used by test classes that derive from ProfileSyncService. |
569 virtual browser_sync::SyncBackendHost* GetBackendForTest(); | 578 virtual browser_sync::SyncBackendHost* GetBackendForTest(); |
570 | 579 |
571 // Helper to install and configure a data type manager. | 580 // Helper to install and configure a data type manager. |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
828 // If |true|, there is setup UI visible so we should not start downloading | 837 // If |true|, there is setup UI visible so we should not start downloading |
829 // data types. | 838 // data types. |
830 bool setup_in_progress_; | 839 bool setup_in_progress_; |
831 | 840 |
832 // The set of currently enabled sync experiments. | 841 // The set of currently enabled sync experiments. |
833 syncer::Experiments current_experiments; | 842 syncer::Experiments current_experiments; |
834 | 843 |
835 // Factory the backend will use to build the SyncManager. | 844 // Factory the backend will use to build the SyncManager. |
836 syncer::SyncManagerFactory sync_manager_factory_; | 845 syncer::SyncManagerFactory sync_manager_factory_; |
837 | 846 |
838 // The set of all registered IDs. | |
839 syncer::ObjectIdSet all_registered_ids_; | |
840 | |
841 // Dispatches invalidations to handlers. | 847 // Dispatches invalidations to handlers. |
842 syncer::SyncNotifierHelper notifier_helper_; | 848 syncer::SyncNotifierHelper notifier_helper_; |
843 | 849 |
844 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService); | 850 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService); |
845 }; | 851 }; |
846 | 852 |
847 bool ShouldShowActionOnUI( | 853 bool ShouldShowActionOnUI( |
848 const syncer::SyncProtocolError& error); | 854 const syncer::SyncProtocolError& error); |
849 | 855 |
850 | 856 |
851 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ | 857 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ |
OLD | NEW |