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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <list> | 9 #include <list> |
10 #include <string> | 10 #include <string> |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
173 SigninManager* signin, | 173 SigninManager* signin, |
174 StartBehavior start_behavior); | 174 StartBehavior start_behavior); |
175 virtual ~ProfileSyncService(); | 175 virtual ~ProfileSyncService(); |
176 | 176 |
177 // Initializes the object. This should be called every time an object of this | 177 // Initializes the object. This should be called every time an object of this |
178 // class is constructed. | 178 // class is constructed. |
179 void Initialize(); | 179 void Initialize(); |
180 | 180 |
181 void RegisterAuthNotifications(); | 181 void RegisterAuthNotifications(); |
182 | 182 |
183 // Returns true if sync is enabled/not suppressed and the user is logged in. | |
184 // Virtual to enable mocking in tests. | |
Nicolas Zea
2012/05/15 23:39:04
Mention that being logged in does not necessarily
Andrew T Wilson (Slow)
2012/05/16 01:05:16
Done.
| |
185 virtual bool IsSyncEnabledAndLoggedIn(); | |
186 | |
183 // Return whether all sync tokens are loaded and available for the backend to | 187 // Return whether all sync tokens are loaded and available for the backend to |
184 // start up. Virtual to enable mocking in tests. | 188 // start up. Virtual to enable mocking in tests. |
185 virtual bool AreCredentialsAvailable(); | 189 virtual bool IsSyncTokenAvailable(); |
186 | 190 |
187 // Registers a data type controller with the sync service. This | 191 // Registers a data type controller with the sync service. This |
188 // makes the data type controller available for use, it does not | 192 // makes the data type controller available for use, it does not |
189 // enable or activate the synchronization of the data type (see | 193 // enable or activate the synchronization of the data type (see |
190 // ActivateDataType). Takes ownership of the pointer. | 194 // ActivateDataType). Takes ownership of the pointer. |
191 void RegisterDataTypeController( | 195 void RegisterDataTypeController( |
192 browser_sync::DataTypeController* data_type_controller); | 196 browser_sync::DataTypeController* data_type_controller); |
193 | 197 |
194 // Returns the session model associator associated with this type, but only if | 198 // Returns the session model associator associated with this type, but only if |
195 // the associator is running. If it is doing anything else, it will return | 199 // the associator is running. If it is doing anything else, it will return |
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
746 browser_sync::Experiments current_experiments; | 750 browser_sync::Experiments current_experiments; |
747 | 751 |
748 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService); | 752 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService); |
749 }; | 753 }; |
750 | 754 |
751 bool ShouldShowActionOnUI( | 755 bool ShouldShowActionOnUI( |
752 const browser_sync::SyncProtocolError& error); | 756 const browser_sync::SyncProtocolError& error); |
753 | 757 |
754 | 758 |
755 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ | 759 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ |
OLD | NEW |