| 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 <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 void UnregisterAuthNotifications(); | 331 void UnregisterAuthNotifications(); |
| 332 | 332 |
| 333 // Return whether OAuth2 refresh token is loaded and available for the backend | 333 // Return whether OAuth2 refresh token is loaded and available for the backend |
| 334 // to start up. Virtual to enable mocking in tests. | 334 // to start up. Virtual to enable mocking in tests. |
| 335 virtual bool IsOAuthRefreshTokenAvailable(); | 335 virtual bool IsOAuthRefreshTokenAvailable(); |
| 336 | 336 |
| 337 // Registers a type whose sync storage will not be managed by the | 337 // Registers a type whose sync storage will not be managed by the |
| 338 // ProfileSyncService. It declares that this sync type may be activated at | 338 // ProfileSyncService. It declares that this sync type may be activated at |
| 339 // some point in the future. This function call does not enable or activate | 339 // some point in the future. This function call does not enable or activate |
| 340 // the syncing of this type | 340 // the syncing of this type |
| 341 // TODO(stanisc): crbug.com/515962: this should merge with |
| 342 // RegisterDataTypeController. |
| 341 void RegisterNonBlockingType(syncer::ModelType type); | 343 void RegisterNonBlockingType(syncer::ModelType type); |
| 342 | 344 |
| 343 // Called by a component that supports non-blocking sync when it is ready to | 345 // Called by a component that supports non-blocking sync when it is ready to |
| 344 // initialize its connection to the sync backend. | 346 // initialize its connection to the sync backend. |
| 345 // | 347 // |
| 346 // If policy allows for syncing this type (ie. it is "preferred"), then this | 348 // If policy allows for syncing this type (ie. it is "preferred"), then this |
| 347 // should result in a message to enable syncing for this type when the sync | 349 // should result in a message to enable syncing for this type when the sync |
| 348 // backend is available. If the type is not to be synced, this should result | 350 // backend is available. If the type is not to be synced, this should result |
| 349 // in a message that allows the component to delete its local sync state. | 351 // in a message that allows the component to delete its local sync state. |
| 352 // TODO(stanisc): crbug.com/515962: review usage of this. |
| 350 void InitializeNonBlockingType( | 353 void InitializeNonBlockingType( |
| 351 syncer::ModelType type, | 354 syncer::ModelType type, |
| 352 const scoped_refptr<base::SequencedTaskRunner>& task_runner, | 355 const scoped_refptr<base::SequencedTaskRunner>& task_runner, |
| 353 const base::WeakPtr<syncer_v2::ModelTypeProcessorImpl>& type_processor); | 356 const base::WeakPtr<syncer_v2::ModelTypeProcessorImpl>& type_processor); |
| 354 | 357 |
| 355 // Returns the SyncedWindowDelegatesGetter from the embedded sessions manager. | 358 // Returns the SyncedWindowDelegatesGetter from the embedded sessions manager. |
| 356 virtual browser_sync::SyncedWindowDelegatesGetter* | 359 virtual browser_sync::SyncedWindowDelegatesGetter* |
| 357 GetSyncedWindowDelegatesGetter() const; | 360 GetSyncedWindowDelegatesGetter() const; |
| 358 | 361 |
| 359 // Returns the SyncableService for syncer::SESSIONS. | 362 // Returns the SyncableService for syncer::SESSIONS. |
| (...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1041 base::WeakPtrFactory<ProfileSyncService> startup_controller_weak_factory_; | 1044 base::WeakPtrFactory<ProfileSyncService> startup_controller_weak_factory_; |
| 1042 | 1045 |
| 1043 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService); | 1046 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService); |
| 1044 }; | 1047 }; |
| 1045 | 1048 |
| 1046 bool ShouldShowActionOnUI( | 1049 bool ShouldShowActionOnUI( |
| 1047 const syncer::SyncProtocolError& error); | 1050 const syncer::SyncProtocolError& error); |
| 1048 | 1051 |
| 1049 | 1052 |
| 1050 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ | 1053 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ |
| OLD | NEW |