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 CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ |
6 #define CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ | 6 #define CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 875 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
886 | 886 |
887 // Manages the start and stop of the various data types. | 887 // Manages the start and stop of the various data types. |
888 scoped_ptr<browser_sync::DataTypeManager> data_type_manager_; | 888 scoped_ptr<browser_sync::DataTypeManager> data_type_manager_; |
889 | 889 |
890 ObserverList<ProfileSyncServiceBase::Observer> observers_; | 890 ObserverList<ProfileSyncServiceBase::Observer> observers_; |
891 | 891 |
892 syncer::SyncJsController sync_js_controller_; | 892 syncer::SyncJsController sync_js_controller_; |
893 | 893 |
894 content::NotificationRegistrar registrar_; | 894 content::NotificationRegistrar registrar_; |
895 | 895 |
896 base::WeakPtrFactory<ProfileSyncService> weak_factory_; | |
897 | |
898 // This allows us to gracefully handle an ABORTED return code from the | 896 // This allows us to gracefully handle an ABORTED return code from the |
899 // DataTypeManager in the event that the server informed us to cease and | 897 // DataTypeManager in the event that the server informed us to cease and |
900 // desist syncing immediately. | 898 // desist syncing immediately. |
901 bool expect_sync_configuration_aborted_; | 899 bool expect_sync_configuration_aborted_; |
902 | 900 |
903 // Sometimes we need to temporarily hold on to a passphrase because we don't | 901 // Sometimes we need to temporarily hold on to a passphrase because we don't |
904 // yet have a backend to send it to. This happens during initialization as | 902 // yet have a backend to send it to. This happens during initialization as |
905 // we don't StartUp until we have a valid token, which happens after valid | 903 // we don't StartUp until we have a valid token, which happens after valid |
906 // credentials were provided. | 904 // credentials were provided. |
907 std::string cached_passphrase_; | 905 std::string cached_passphrase_; |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
971 | 969 |
972 // ProfileSyncService needs to hold reference to access_token_request_ for | 970 // ProfileSyncService needs to hold reference to access_token_request_ for |
973 // the duration of request in order to receive callbacks. | 971 // the duration of request in order to receive callbacks. |
974 scoped_ptr<OAuth2TokenService::Request> access_token_request_; | 972 scoped_ptr<OAuth2TokenService::Request> access_token_request_; |
975 | 973 |
976 // If RequestAccessToken fails with transient error then retry requesting | 974 // If RequestAccessToken fails with transient error then retry requesting |
977 // access token with exponential backoff. | 975 // access token with exponential backoff. |
978 base::OneShotTimer<ProfileSyncService> request_access_token_retry_timer_; | 976 base::OneShotTimer<ProfileSyncService> request_access_token_retry_timer_; |
979 net::BackoffEntry request_access_token_backoff_; | 977 net::BackoffEntry request_access_token_backoff_; |
980 | 978 |
| 979 base::WeakPtrFactory<ProfileSyncService> weak_factory_; |
| 980 |
981 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService); | 981 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService); |
982 }; | 982 }; |
983 | 983 |
984 bool ShouldShowActionOnUI( | 984 bool ShouldShowActionOnUI( |
985 const syncer::SyncProtocolError& error); | 985 const syncer::SyncProtocolError& error); |
986 | 986 |
987 | 987 |
988 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ | 988 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ |
OLD | NEW |