| 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_PROFILE_SYNC_SERVICE_H_ | 5 #ifndef COMPONENTS_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ |
| 6 #define COMPONENTS_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ | 6 #define COMPONENTS_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 352 // Fills state_map with a map of current data types that are possible to | 352 // Fills state_map with a map of current data types that are possible to |
| 353 // sync, as well as their states. | 353 // sync, as well as their states. |
| 354 void GetDataTypeControllerStates( | 354 void GetDataTypeControllerStates( |
| 355 syncer::DataTypeController::StateMap* state_map) const; | 355 syncer::DataTypeController::StateMap* state_map) const; |
| 356 | 356 |
| 357 // Called when asynchronous session restore has completed. | 357 // Called when asynchronous session restore has completed. |
| 358 void OnSessionRestoreComplete(); | 358 void OnSessionRestoreComplete(); |
| 359 | 359 |
| 360 // SyncEngineHost implementation. | 360 // SyncEngineHost implementation. |
| 361 void OnEngineInitialized( | 361 void OnEngineInitialized( |
| 362 syncer::ModelTypeSet initial_types, |
| 362 const syncer::WeakHandle<syncer::JsBackend>& js_backend, | 363 const syncer::WeakHandle<syncer::JsBackend>& js_backend, |
| 363 const syncer::WeakHandle<syncer::DataTypeDebugInfoListener>& | 364 const syncer::WeakHandle<syncer::DataTypeDebugInfoListener>& |
| 364 debug_info_listener, | 365 debug_info_listener, |
| 365 const std::string& cache_guid, | 366 const std::string& cache_guid, |
| 366 bool success) override; | 367 bool success) override; |
| 367 void OnSyncCycleCompleted() override; | 368 void OnSyncCycleCompleted() override; |
| 368 void OnProtocolEvent(const syncer::ProtocolEvent& event) override; | 369 void OnProtocolEvent(const syncer::ProtocolEvent& event) override; |
| 369 void OnDirectoryTypeCommitCounterUpdated( | 370 void OnDirectoryTypeCommitCounterUpdated( |
| 370 syncer::ModelType type, | 371 syncer::ModelType type, |
| 371 const syncer::CommitCounters& counters) override; | 372 const syncer::CommitCounters& counters) override; |
| (...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 709 // Internal unrecoverable error handler. Used to track error reason via | 710 // Internal unrecoverable error handler. Used to track error reason via |
| 710 // Sync.UnrecoverableErrors histogram. | 711 // Sync.UnrecoverableErrors histogram. |
| 711 void OnInternalUnrecoverableError(const tracked_objects::Location& from_here, | 712 void OnInternalUnrecoverableError(const tracked_objects::Location& from_here, |
| 712 const std::string& message, | 713 const std::string& message, |
| 713 bool delete_sync_database, | 714 bool delete_sync_database, |
| 714 UnrecoverableErrorReason reason); | 715 UnrecoverableErrorReason reason); |
| 715 | 716 |
| 716 // Update UMA for syncing engine. | 717 // Update UMA for syncing engine. |
| 717 void UpdateEngineInitUMA(bool success); | 718 void UpdateEngineInitUMA(bool success); |
| 718 | 719 |
| 719 // Various setup following engine initialization, mostly for syncing engine. | |
| 720 void PostEngineInitialization(); | |
| 721 | |
| 722 // Whether sync has been authenticated with an account ID. | 720 // Whether sync has been authenticated with an account ID. |
| 723 bool IsSignedIn() const; | 721 bool IsSignedIn() const; |
| 724 | 722 |
| 725 // The engine can only start if sync can start and has an auth token. This is | 723 // The engine can only start if sync can start and has an auth token. This is |
| 726 // different fron CanSyncStart because it represents whether the engine can | 724 // different fron CanSyncStart because it represents whether the engine can |
| 727 // be started at this moment, whereas CanSyncStart represents whether sync can | 725 // be started at this moment, whereas CanSyncStart represents whether sync can |
| 728 // conceptually start without further user action (acquiring a token is an | 726 // conceptually start without further user action (acquiring a token is an |
| 729 // automatic process). | 727 // automatic process). |
| 730 bool CanEngineStart() const; | 728 bool CanEngineStart() const; |
| 731 | 729 |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 994 base::WeakPtrFactory<ProfileSyncService> weak_factory_; | 992 base::WeakPtrFactory<ProfileSyncService> weak_factory_; |
| 995 | 993 |
| 996 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService); | 994 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService); |
| 997 }; | 995 }; |
| 998 | 996 |
| 999 bool ShouldShowActionOnUI(const syncer::SyncProtocolError& error); | 997 bool ShouldShowActionOnUI(const syncer::SyncProtocolError& error); |
| 1000 | 998 |
| 1001 } // namespace browser_sync | 999 } // namespace browser_sync |
| 1002 | 1000 |
| 1003 #endif // COMPONENTS_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ | 1001 #endif // COMPONENTS_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ |
| OLD | NEW |