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 697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
708 void RefreshSpareBootstrapToken(const std::string& passphrase); | 708 void RefreshSpareBootstrapToken(const std::string& passphrase); |
709 #endif | 709 #endif |
710 | 710 |
711 // Internal unrecoverable error handler. Used to track error reason via | 711 // Internal unrecoverable error handler. Used to track error reason via |
712 // Sync.UnrecoverableErrors histogram. | 712 // Sync.UnrecoverableErrors histogram. |
713 void OnInternalUnrecoverableError(const tracked_objects::Location& from_here, | 713 void OnInternalUnrecoverableError(const tracked_objects::Location& from_here, |
714 const std::string& message, | 714 const std::string& message, |
715 bool delete_sync_database, | 715 bool delete_sync_database, |
716 UnrecoverableErrorReason reason); | 716 UnrecoverableErrorReason reason); |
717 | 717 |
718 // Must be called every time |backend_initialized_| or |state_| is | |
Nicolas Zea
2012/10/04 00:21:00
state_ -> invalidator_state_?
akalin
2012/10/05 21:35:16
Done.
| |
719 // changed (but only if |invalidator_registrar_| is not NULL). | |
720 void UpdateInvalidatorState(); | |
Nicolas Zea
2012/10/04 00:21:00
This isn't actually updating the local state, perh
akalin
2012/10/05 21:35:16
Renamed to UpdateInvalidatorRegistrarState(). Doe
| |
721 | |
718 // Destroys / recreates an instance of ProfileSyncService. Used exclusively by | 722 // Destroys / recreates an instance of ProfileSyncService. Used exclusively by |
719 // the sync integration tests so they can restart sync from scratch without | 723 // the sync integration tests so they can restart sync from scratch without |
720 // tearing down and recreating the browser process. Needed because simply | 724 // tearing down and recreating the browser process. Needed because simply |
721 // calling Shutdown() and Initialize() will not recreate other internal | 725 // calling Shutdown() and Initialize() will not recreate other internal |
722 // objects like SyncBackendHost, SyncManager, etc. | 726 // objects like SyncBackendHost, SyncManager, etc. |
723 void ResetForTest(); | 727 void ResetForTest(); |
724 | 728 |
725 // Factory used to create various dependent objects. | 729 // Factory used to create various dependent objects. |
726 scoped_ptr<ProfileSyncComponentsFactory> factory_; | 730 scoped_ptr<ProfileSyncComponentsFactory> factory_; |
727 | 731 |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
836 // If |true|, there is setup UI visible so we should not start downloading | 840 // If |true|, there is setup UI visible so we should not start downloading |
837 // data types. | 841 // data types. |
838 bool setup_in_progress_; | 842 bool setup_in_progress_; |
839 | 843 |
840 // The set of currently enabled sync experiments. | 844 // The set of currently enabled sync experiments. |
841 syncer::Experiments current_experiments; | 845 syncer::Experiments current_experiments; |
842 | 846 |
843 // Factory the backend will use to build the SyncManager. | 847 // Factory the backend will use to build the SyncManager. |
844 syncer::SyncManagerFactory sync_manager_factory_; | 848 syncer::SyncManagerFactory sync_manager_factory_; |
845 | 849 |
850 // Holds the current invalidator state as updated by | |
851 // OnInvalidatorStateChange(). Note that this is different from the | |
852 // state known by |invalidator_registrar_| (See | |
853 // UpdateInvalidatorState()). | |
854 syncer::InvalidatorState invalidator_state_; | |
855 | |
846 // Dispatches invalidations to handlers. Set in Initialize() and | 856 // Dispatches invalidations to handlers. Set in Initialize() and |
847 // unset in Shutdown(). | 857 // unset in Shutdown(). |
848 scoped_ptr<syncer::InvalidatorRegistrar> invalidator_registrar_; | 858 scoped_ptr<syncer::InvalidatorRegistrar> invalidator_registrar_; |
849 | 859 |
850 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService); | 860 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService); |
851 }; | 861 }; |
852 | 862 |
853 bool ShouldShowActionOnUI( | 863 bool ShouldShowActionOnUI( |
854 const syncer::SyncProtocolError& error); | 864 const syncer::SyncProtocolError& error); |
855 | 865 |
856 | 866 |
857 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ | 867 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ |
OLD | NEW |