| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_SIGNIN_CORE_BROWSER_GAIA_COOKIE_MANAGER_SERVICE_H | 5 #ifndef COMPONENTS_SIGNIN_CORE_BROWSER_GAIA_COOKIE_MANAGER_SERVICE_H |
| 6 #define COMPONENTS_SIGNIN_CORE_BROWSER_GAIA_COOKIE_MANAGER_SERVICE_H | 6 #define COMPONENTS_SIGNIN_CORE_BROWSER_GAIA_COOKIE_MANAGER_SERVICE_H |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 | 9 |
| 10 #include "base/observer_list.h" | 10 #include "base/observer_list.h" |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 void OnURLFetchComplete(const net::URLFetcher* source) override; | 134 void OnURLFetchComplete(const net::URLFetcher* source) override; |
| 135 | 135 |
| 136 // Any fetches still ongoing after this call are considered timed out. | 136 // Any fetches still ongoing after this call are considered timed out. |
| 137 void Timeout(); | 137 void Timeout(); |
| 138 | 138 |
| 139 void CleanupTransientState(); | 139 void CleanupTransientState(); |
| 140 | 140 |
| 141 void GetCheckConnectionInfoCompleted(bool succeeded); | 141 void GetCheckConnectionInfoCompleted(bool succeeded); |
| 142 | 142 |
| 143 GaiaCookieManagerService* helper_; | 143 GaiaCookieManagerService* helper_; |
| 144 base::OneShotTimer<ExternalCcResultFetcher> timer_; | 144 base::OneShotTimer timer_; |
| 145 URLToTokenAndFetcher fetchers_; | 145 URLToTokenAndFetcher fetchers_; |
| 146 ResultMap results_; | 146 ResultMap results_; |
| 147 base::Time m_external_cc_result_start_time_; | 147 base::Time m_external_cc_result_start_time_; |
| 148 | 148 |
| 149 base::OneShotTimer<ExternalCcResultFetcher> gaia_auth_fetcher_timer_; | 149 base::OneShotTimer gaia_auth_fetcher_timer_; |
| 150 | 150 |
| 151 DISALLOW_COPY_AND_ASSIGN(ExternalCcResultFetcher); | 151 DISALLOW_COPY_AND_ASSIGN(ExternalCcResultFetcher); |
| 152 }; | 152 }; |
| 153 | 153 |
| 154 GaiaCookieManagerService(OAuth2TokenService* token_service, | 154 GaiaCookieManagerService(OAuth2TokenService* token_service, |
| 155 const std::string& source, | 155 const std::string& source, |
| 156 SigninClient* signin_client); | 156 SigninClient* signin_client); |
| 157 ~GaiaCookieManagerService() override; | 157 ~GaiaCookieManagerService() override; |
| 158 | 158 |
| 159 void Init(); | 159 void Init(); |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 | 239 |
| 240 OAuth2TokenService* token_service_; | 240 OAuth2TokenService* token_service_; |
| 241 SigninClient* signin_client_; | 241 SigninClient* signin_client_; |
| 242 scoped_ptr<GaiaAuthFetcher> gaia_auth_fetcher_; | 242 scoped_ptr<GaiaAuthFetcher> gaia_auth_fetcher_; |
| 243 scoped_ptr<UbertokenFetcher> uber_token_fetcher_; | 243 scoped_ptr<UbertokenFetcher> uber_token_fetcher_; |
| 244 ExternalCcResultFetcher external_cc_result_fetcher_; | 244 ExternalCcResultFetcher external_cc_result_fetcher_; |
| 245 | 245 |
| 246 // If the GaiaAuthFetcher or URLFetcher fails, retry with exponential backoff | 246 // If the GaiaAuthFetcher or URLFetcher fails, retry with exponential backoff |
| 247 // and network delay. | 247 // and network delay. |
| 248 net::BackoffEntry fetcher_backoff_; | 248 net::BackoffEntry fetcher_backoff_; |
| 249 // We can safely depend on the SigninClient here because there is an explicit | 249 base::OneShotTimer fetcher_timer_; |
| 250 // dependency, as noted in the GaiaCookieManagerServiceFactory. | |
| 251 base::OneShotTimer<SigninClient> fetcher_timer_; | |
| 252 int fetcher_retries_; | 250 int fetcher_retries_; |
| 253 | 251 |
| 254 // The last fetched ubertoken, for use in MergeSession retries. | 252 // The last fetched ubertoken, for use in MergeSession retries. |
| 255 std::string uber_token_; | 253 std::string uber_token_; |
| 256 | 254 |
| 257 // The access token that can be used to prime the UberToken fetch. | 255 // The access token that can be used to prime the UberToken fetch. |
| 258 std::string access_token_; | 256 std::string access_token_; |
| 259 | 257 |
| 260 // Subscription to be called whenever the GAIA cookies change. | 258 // Subscription to be called whenever the GAIA cookies change. |
| 261 scoped_ptr<SigninClient::CookieChangedSubscription> | 259 scoped_ptr<SigninClient::CookieChangedSubscription> |
| (...skipping 15 matching lines...) Expand all Loading... |
| 277 bool external_cc_result_fetched_; | 275 bool external_cc_result_fetched_; |
| 278 | 276 |
| 279 std::vector<gaia::ListedAccount> listed_accounts_; | 277 std::vector<gaia::ListedAccount> listed_accounts_; |
| 280 | 278 |
| 281 bool list_accounts_fetched_once_; | 279 bool list_accounts_fetched_once_; |
| 282 | 280 |
| 283 DISALLOW_COPY_AND_ASSIGN(GaiaCookieManagerService); | 281 DISALLOW_COPY_AND_ASSIGN(GaiaCookieManagerService); |
| 284 }; | 282 }; |
| 285 | 283 |
| 286 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_GAIA_COOKIE_MANAGER_SERVICE_H | 284 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_GAIA_COOKIE_MANAGER_SERVICE_H |
| OLD | NEW |