| 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 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 std::unique_ptr<SigninManagerWrapper> signin_wrapper; | 234 std::unique_ptr<SigninManagerWrapper> signin_wrapper; |
| 235 ProfileOAuth2TokenService* oauth2_token_service = nullptr; | 235 ProfileOAuth2TokenService* oauth2_token_service = nullptr; |
| 236 GaiaCookieManagerService* gaia_cookie_manager_service = nullptr; | 236 GaiaCookieManagerService* gaia_cookie_manager_service = nullptr; |
| 237 StartBehavior start_behavior = MANUAL_START; | 237 StartBehavior start_behavior = MANUAL_START; |
| 238 syncer::NetworkTimeUpdateCallback network_time_update_callback; | 238 syncer::NetworkTimeUpdateCallback network_time_update_callback; |
| 239 base::FilePath base_directory; | 239 base::FilePath base_directory; |
| 240 scoped_refptr<net::URLRequestContextGetter> url_request_context; | 240 scoped_refptr<net::URLRequestContextGetter> url_request_context; |
| 241 std::string debug_identifier; | 241 std::string debug_identifier; |
| 242 version_info::Channel channel = version_info::Channel::UNKNOWN; | 242 version_info::Channel channel = version_info::Channel::UNKNOWN; |
| 243 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner; | 243 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner; |
| 244 base::FilePath local_sync_backend_folder; | |
| 245 | 244 |
| 246 private: | 245 private: |
| 247 DISALLOW_COPY_AND_ASSIGN(InitParams); | 246 DISALLOW_COPY_AND_ASSIGN(InitParams); |
| 248 }; | 247 }; |
| 249 | 248 |
| 250 explicit ProfileSyncService(InitParams init_params); | 249 explicit ProfileSyncService(InitParams init_params); |
| 251 | 250 |
| 252 ~ProfileSyncService() override; | 251 ~ProfileSyncService() override; |
| 253 | 252 |
| 254 // Initializes the object. This must be called at most once, and | 253 // Initializes the object. This must be called at most once, and |
| (...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 779 | 778 |
| 780 // Set when sync receives DISABLED_BY_ADMIN error from server. Prevents | 779 // Set when sync receives DISABLED_BY_ADMIN error from server. Prevents |
| 781 // ProfileSyncService from starting engine till browser restarted or user | 780 // ProfileSyncService from starting engine till browser restarted or user |
| 782 // signed out. | 781 // signed out. |
| 783 bool sync_disabled_by_admin_; | 782 bool sync_disabled_by_admin_; |
| 784 | 783 |
| 785 // Set to true if a signin has completed but we're still waiting for the | 784 // Set to true if a signin has completed but we're still waiting for the |
| 786 // engine to refresh its credentials. | 785 // engine to refresh its credentials. |
| 787 bool is_auth_in_progress_; | 786 bool is_auth_in_progress_; |
| 788 | 787 |
| 789 // The location where the local sync backend stores its data. | |
| 790 base::FilePath local_sync_backend_folder_; | |
| 791 | |
| 792 // Information describing an unrecoverable error. | 788 // Information describing an unrecoverable error. |
| 793 UnrecoverableErrorReason unrecoverable_error_reason_; | 789 UnrecoverableErrorReason unrecoverable_error_reason_; |
| 794 std::string unrecoverable_error_message_; | 790 std::string unrecoverable_error_message_; |
| 795 tracked_objects::Location unrecoverable_error_location_; | 791 tracked_objects::Location unrecoverable_error_location_; |
| 796 | 792 |
| 797 // Manages the start and stop of the data types. | 793 // Manages the start and stop of the data types. |
| 798 std::unique_ptr<syncer::DataTypeManager> data_type_manager_; | 794 std::unique_ptr<syncer::DataTypeManager> data_type_manager_; |
| 799 | 795 |
| 800 base::ObserverList<syncer::ProtocolEventObserver> protocol_event_observers_; | 796 base::ObserverList<syncer::ProtocolEventObserver> protocol_event_observers_; |
| 801 base::ObserverList<syncer::TypeDebugInfoObserver> type_debug_info_observers_; | 797 base::ObserverList<syncer::TypeDebugInfoObserver> type_debug_info_observers_; |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 892 base::WeakPtrFactory<ProfileSyncService> weak_factory_; | 888 base::WeakPtrFactory<ProfileSyncService> weak_factory_; |
| 893 | 889 |
| 894 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService); | 890 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService); |
| 895 }; | 891 }; |
| 896 | 892 |
| 897 bool ShouldShowActionOnUI(const syncer::SyncProtocolError& error); | 893 bool ShouldShowActionOnUI(const syncer::SyncProtocolError& error); |
| 898 | 894 |
| 899 } // namespace browser_sync | 895 } // namespace browser_sync |
| 900 | 896 |
| 901 #endif // COMPONENTS_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ | 897 #endif // COMPONENTS_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ |
| OLD | NEW |