| 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 903 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 914 | 914 |
| 915 syncer::DataTypeManager::ConfigureStatus configure_status_; | 915 syncer::DataTypeManager::ConfigureStatus configure_status_; |
| 916 | 916 |
| 917 // The set of currently enabled sync experiments. | 917 // The set of currently enabled sync experiments. |
| 918 syncer::Experiments current_experiments_; | 918 syncer::Experiments current_experiments_; |
| 919 | 919 |
| 920 // Sync's internal debug info listener. Used to record datatype configuration | 920 // Sync's internal debug info listener. Used to record datatype configuration |
| 921 // and association information. | 921 // and association information. |
| 922 syncer::WeakHandle<syncer::DataTypeDebugInfoListener> debug_info_listener_; | 922 syncer::WeakHandle<syncer::DataTypeDebugInfoListener> debug_info_listener_; |
| 923 | 923 |
| 924 // A thread where all the sync operations happen. | 924 // The thread where all the sync operations happen. This thread is kept alive |
| 925 // OWNERSHIP Notes: | 925 // until browser shutdown and reused if sync is turned off and on again. It is |
| 926 // * Created when backend starts for the first time. | 926 // joined during the shutdown process, but there is an abort mechanism in |
| 927 // * If sync is disabled, PSS claims ownership from backend. | 927 // place to prevent slow HTTP requests from blocking browser shutdown. |
| 928 // * If sync is reenabled, PSS passes ownership to new backend. | |
| 929 std::unique_ptr<base::Thread> sync_thread_; | 928 std::unique_ptr<base::Thread> sync_thread_; |
| 930 | 929 |
| 931 // ProfileSyncService uses this service to get access tokens. | 930 // ProfileSyncService uses this service to get access tokens. |
| 932 ProfileOAuth2TokenService* const oauth2_token_service_; | 931 ProfileOAuth2TokenService* const oauth2_token_service_; |
| 933 | 932 |
| 934 // ProfileSyncService needs to remember access token in order to invalidate it | 933 // ProfileSyncService needs to remember access token in order to invalidate it |
| 935 // with OAuth2TokenService. | 934 // with OAuth2TokenService. |
| 936 std::string access_token_; | 935 std::string access_token_; |
| 937 | 936 |
| 938 // ProfileSyncService needs to hold reference to access_token_request_ for | 937 // ProfileSyncService needs to hold reference to access_token_request_ for |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1008 base::WeakPtrFactory<ProfileSyncService> weak_factory_; | 1007 base::WeakPtrFactory<ProfileSyncService> weak_factory_; |
| 1009 | 1008 |
| 1010 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService); | 1009 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService); |
| 1011 }; | 1010 }; |
| 1012 | 1011 |
| 1013 bool ShouldShowActionOnUI(const syncer::SyncProtocolError& error); | 1012 bool ShouldShowActionOnUI(const syncer::SyncProtocolError& error); |
| 1014 | 1013 |
| 1015 } // namespace browser_sync | 1014 } // namespace browser_sync |
| 1016 | 1015 |
| 1017 #endif // COMPONENTS_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ | 1016 #endif // COMPONENTS_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ |
| OLD | NEW |