Chromium Code Reviews| 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. |
| 925 // OWNERSHIP Notes: | |
| 926 // * Created when backend starts for the first time. | |
| 927 // * If sync is disabled, PSS claims ownership from backend. | |
| 928 // * If sync is reenabled, PSS passes ownership to new backend. | |
| 929 std::unique_ptr<base::Thread> sync_thread_; | 925 std::unique_ptr<base::Thread> sync_thread_; |
|
Nicolas Zea
2016/11/07 20:29:46
I think it's worth explaining the lifetime of this
maxbogue
2016/11/07 23:12:05
Done, PTAL!
| |
| 930 | 926 |
| 931 // ProfileSyncService uses this service to get access tokens. | 927 // ProfileSyncService uses this service to get access tokens. |
| 932 ProfileOAuth2TokenService* const oauth2_token_service_; | 928 ProfileOAuth2TokenService* const oauth2_token_service_; |
| 933 | 929 |
| 934 // ProfileSyncService needs to remember access token in order to invalidate it | 930 // ProfileSyncService needs to remember access token in order to invalidate it |
| 935 // with OAuth2TokenService. | 931 // with OAuth2TokenService. |
| 936 std::string access_token_; | 932 std::string access_token_; |
| 937 | 933 |
| 938 // ProfileSyncService needs to hold reference to access_token_request_ for | 934 // ProfileSyncService needs to hold reference to access_token_request_ for |
| 939 // the duration of request in order to receive callbacks. | 935 // the duration of request in order to receive callbacks. |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1008 base::WeakPtrFactory<ProfileSyncService> weak_factory_; | 1004 base::WeakPtrFactory<ProfileSyncService> weak_factory_; |
| 1009 | 1005 |
| 1010 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService); | 1006 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService); |
| 1011 }; | 1007 }; |
| 1012 | 1008 |
| 1013 bool ShouldShowActionOnUI(const syncer::SyncProtocolError& error); | 1009 bool ShouldShowActionOnUI(const syncer::SyncProtocolError& error); |
| 1014 | 1010 |
| 1015 } // namespace browser_sync | 1011 } // namespace browser_sync |
| 1016 | 1012 |
| 1017 #endif // COMPONENTS_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ | 1013 #endif // COMPONENTS_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ |
| OLD | NEW |