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 COMPONENTS_BROWSER_SYNC_BROWSER_PROFILE_SYNC_SERVICE_H_ | 5 #ifndef COMPONENTS_BROWSER_SYNC_BROWSER_PROFILE_SYNC_SERVICE_H_ |
6 #define COMPONENTS_BROWSER_SYNC_BROWSER_PROFILE_SYNC_SERVICE_H_ | 6 #define COMPONENTS_BROWSER_SYNC_BROWSER_PROFILE_SYNC_SERVICE_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
335 // Remove a sync type preference provider. May only be called for providers | 335 // Remove a sync type preference provider. May only be called for providers |
336 // that have been added. Providers must not remove themselves while being | 336 // that have been added. Providers must not remove themselves while being |
337 // called back. | 337 // called back. |
338 void RemovePreferenceProvider(SyncTypePreferenceProvider* provider); | 338 void RemovePreferenceProvider(SyncTypePreferenceProvider* provider); |
339 // Check whether a given sync type preference provider has been added. | 339 // Check whether a given sync type preference provider has been added. |
340 bool HasPreferenceProvider(SyncTypePreferenceProvider* provider) const; | 340 bool HasPreferenceProvider(SyncTypePreferenceProvider* provider) const; |
341 | 341 |
342 void RegisterAuthNotifications(); | 342 void RegisterAuthNotifications(); |
343 void UnregisterAuthNotifications(); | 343 void UnregisterAuthNotifications(); |
344 | 344 |
345 // Return whether OAuth2 refresh token is loaded and available for the backend | |
346 // to start up. Virtual to enable mocking in tests. | |
347 virtual bool IsOAuthRefreshTokenAvailable(); | |
348 | |
349 // Returns the SyncableService for syncer::SESSIONS. | 345 // Returns the SyncableService for syncer::SESSIONS. |
350 virtual syncer::SyncableService* GetSessionsSyncableService(); | 346 virtual syncer::SyncableService* GetSessionsSyncableService(); |
351 | 347 |
352 // Returns the SyncableService for syncer::DEVICE_INFO. | 348 // Returns the SyncableService for syncer::DEVICE_INFO. |
353 virtual syncer::SyncableService* GetDeviceInfoSyncableService(); | 349 virtual syncer::SyncableService* GetDeviceInfoSyncableService(); |
354 | 350 |
355 // Returns synced devices tracker. | 351 // Returns synced devices tracker. |
356 virtual sync_driver::DeviceInfoTracker* GetDeviceInfoTracker() const; | 352 virtual sync_driver::DeviceInfoTracker* GetDeviceInfoTracker() const; |
357 | 353 |
358 // Fills state_map with a map of current data types that are possible to | 354 // Fills state_map with a map of current data types that are possible to |
(...skipping 679 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1038 base::WeakPtrFactory<ProfileSyncService> startup_controller_weak_factory_; | 1034 base::WeakPtrFactory<ProfileSyncService> startup_controller_weak_factory_; |
1039 | 1035 |
1040 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService); | 1036 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService); |
1041 }; | 1037 }; |
1042 | 1038 |
1043 bool ShouldShowActionOnUI( | 1039 bool ShouldShowActionOnUI( |
1044 const syncer::SyncProtocolError& error); | 1040 const syncer::SyncProtocolError& error); |
1045 | 1041 |
1046 | 1042 |
1047 #endif // COMPONENTS_BROWSER_SYNC_BROWSER_PROFILE_SYNC_SERVICE_H_ | 1043 #endif // COMPONENTS_BROWSER_SYNC_BROWSER_PROFILE_SYNC_SERVICE_H_ |
OLD | NEW |