| 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 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 std::unique_ptr<SigninManagerWrapper> signin_wrapper; | 239 std::unique_ptr<SigninManagerWrapper> signin_wrapper; |
| 240 ProfileOAuth2TokenService* oauth2_token_service = nullptr; | 240 ProfileOAuth2TokenService* oauth2_token_service = nullptr; |
| 241 GaiaCookieManagerService* gaia_cookie_manager_service = nullptr; | 241 GaiaCookieManagerService* gaia_cookie_manager_service = nullptr; |
| 242 StartBehavior start_behavior = MANUAL_START; | 242 StartBehavior start_behavior = MANUAL_START; |
| 243 syncer::NetworkTimeUpdateCallback network_time_update_callback; | 243 syncer::NetworkTimeUpdateCallback network_time_update_callback; |
| 244 base::FilePath base_directory; | 244 base::FilePath base_directory; |
| 245 scoped_refptr<net::URLRequestContextGetter> url_request_context; | 245 scoped_refptr<net::URLRequestContextGetter> url_request_context; |
| 246 std::string debug_identifier; | 246 std::string debug_identifier; |
| 247 version_info::Channel channel = version_info::Channel::UNKNOWN; | 247 version_info::Channel channel = version_info::Channel::UNKNOWN; |
| 248 base::SequencedWorkerPool* blocking_pool = nullptr; | 248 base::SequencedWorkerPool* blocking_pool = nullptr; |
| 249 bool local_sync_backend_enabled = false; |
| 250 base::FilePath local_sync_backend_folder; |
| 249 | 251 |
| 250 private: | 252 private: |
| 251 DISALLOW_COPY_AND_ASSIGN(InitParams); | 253 DISALLOW_COPY_AND_ASSIGN(InitParams); |
| 252 }; | 254 }; |
| 253 | 255 |
| 254 explicit ProfileSyncService(InitParams init_params); | 256 explicit ProfileSyncService(InitParams init_params); |
| 255 | 257 |
| 256 ~ProfileSyncService() override; | 258 ~ProfileSyncService() override; |
| 257 | 259 |
| 258 // Initializes the object. This must be called at most once, and | 260 // Initializes the object. This must be called at most once, and |
| (...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 842 | 844 |
| 843 // Set when sync receives DISABLED_BY_ADMIN error from server. Prevents | 845 // Set when sync receives DISABLED_BY_ADMIN error from server. Prevents |
| 844 // ProfileSyncService from starting backend till browser restarted or user | 846 // ProfileSyncService from starting backend till browser restarted or user |
| 845 // signed out. | 847 // signed out. |
| 846 bool sync_disabled_by_admin_; | 848 bool sync_disabled_by_admin_; |
| 847 | 849 |
| 848 // Set to true if a signin has completed but we're still waiting for the | 850 // Set to true if a signin has completed but we're still waiting for the |
| 849 // backend to refresh its credentials. | 851 // backend to refresh its credentials. |
| 850 bool is_auth_in_progress_; | 852 bool is_auth_in_progress_; |
| 851 | 853 |
| 854 // Set to true when sync should use a local sync backend to store its data. |
| 855 bool local_sync_backend_enabled_; |
| 856 |
| 857 // The location where the local sync backend stores its data. |
| 858 base::FilePath local_sync_backend_folder_; |
| 859 |
| 852 // Encapsulates user signin - used to set/get the user's authenticated | 860 // Encapsulates user signin - used to set/get the user's authenticated |
| 853 // email address. | 861 // email address. |
| 854 const std::unique_ptr<SigninManagerWrapper> signin_; | 862 const std::unique_ptr<SigninManagerWrapper> signin_; |
| 855 | 863 |
| 856 // Information describing an unrecoverable error. | 864 // Information describing an unrecoverable error. |
| 857 UnrecoverableErrorReason unrecoverable_error_reason_; | 865 UnrecoverableErrorReason unrecoverable_error_reason_; |
| 858 std::string unrecoverable_error_message_; | 866 std::string unrecoverable_error_message_; |
| 859 tracked_objects::Location unrecoverable_error_location_; | 867 tracked_objects::Location unrecoverable_error_location_; |
| 860 | 868 |
| 861 // Manages the start and stop of the data types. | 869 // Manages the start and stop of the data types. |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1003 base::WeakPtrFactory<ProfileSyncService> weak_factory_; | 1011 base::WeakPtrFactory<ProfileSyncService> weak_factory_; |
| 1004 | 1012 |
| 1005 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService); | 1013 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService); |
| 1006 }; | 1014 }; |
| 1007 | 1015 |
| 1008 bool ShouldShowActionOnUI(const syncer::SyncProtocolError& error); | 1016 bool ShouldShowActionOnUI(const syncer::SyncProtocolError& error); |
| 1009 | 1017 |
| 1010 } // namespace browser_sync | 1018 } // namespace browser_sync |
| 1011 | 1019 |
| 1012 #endif // COMPONENTS_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ | 1020 #endif // COMPONENTS_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ |
| OLD | NEW |