| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_CHILD_ACCOUNT_INFO_FETCHER_IMPL_H_ | 5 #ifndef COMPONENTS_SIGNIN_CORE_BROWSER_CHILD_ACCOUNT_INFO_FETCHER_IMPL_H_ |
| 6 #define COMPONENTS_SIGNIN_CORE_BROWSER_CHILD_ACCOUNT_INFO_FETCHER_IMPL_H_ | 6 #define COMPONENTS_SIGNIN_CORE_BROWSER_CHILD_ACCOUNT_INFO_FETCHER_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/threading/thread_checker.h" | 8 #include "base/threading/thread_checker.h" |
| 9 #include "base/timer/timer.h" | 9 #include "base/timer/timer.h" |
| 10 #include "components/invalidation/public/invalidation_handler.h" | 10 #include "components/invalidation/public/invalidation_handler.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 const std::string& account_id, | 24 const std::string& account_id, |
| 25 AccountFetcherService* fetcher_service, | 25 AccountFetcherService* fetcher_service, |
| 26 OAuth2TokenService* token_service, | 26 OAuth2TokenService* token_service, |
| 27 net::URLRequestContextGetter* request_context_getter, | 27 net::URLRequestContextGetter* request_context_getter, |
| 28 invalidation::InvalidationService* invalidation_service); | 28 invalidation::InvalidationService* invalidation_service); |
| 29 ~ChildAccountInfoFetcherImpl() override; | 29 ~ChildAccountInfoFetcherImpl() override; |
| 30 | 30 |
| 31 private: | 31 private: |
| 32 void FetchIfNotInProgress(); | 32 void FetchIfNotInProgress(); |
| 33 void HandleFailure(); | 33 void HandleFailure(); |
| 34 void UnregisterInvalidationHandler(); |
| 34 | 35 |
| 35 // OAuth2TokenService::Consumer: | 36 // OAuth2TokenService::Consumer: |
| 36 void OnGetTokenSuccess(const OAuth2TokenService::Request* request, | 37 void OnGetTokenSuccess(const OAuth2TokenService::Request* request, |
| 37 const std::string& access_token, | 38 const std::string& access_token, |
| 38 const base::Time& expiration_time) override; | 39 const base::Time& expiration_time) override; |
| 39 void OnGetTokenFailure(const OAuth2TokenService::Request* request, | 40 void OnGetTokenFailure(const OAuth2TokenService::Request* request, |
| 40 const GoogleServiceAuthError& error) override; | 41 const GoogleServiceAuthError& error) override; |
| 41 | 42 |
| 42 // GaiaAuthConsumer: | 43 // GaiaAuthConsumer: |
| 43 void OnClientLoginSuccess(const ClientLoginResult& result) override; | 44 void OnClientLoginSuccess(const ClientLoginResult& result) override; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 64 scoped_ptr<OAuth2TokenService::Request> login_token_request_; | 65 scoped_ptr<OAuth2TokenService::Request> login_token_request_; |
| 65 scoped_ptr<GaiaAuthFetcher> gaia_auth_fetcher_; | 66 scoped_ptr<GaiaAuthFetcher> gaia_auth_fetcher_; |
| 66 | 67 |
| 67 bool fetch_in_progress_; | 68 bool fetch_in_progress_; |
| 68 base::ThreadChecker thread_checker_; | 69 base::ThreadChecker thread_checker_; |
| 69 | 70 |
| 70 DISALLOW_COPY_AND_ASSIGN(ChildAccountInfoFetcherImpl); | 71 DISALLOW_COPY_AND_ASSIGN(ChildAccountInfoFetcherImpl); |
| 71 }; | 72 }; |
| 72 | 73 |
| 73 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_CHILD_ACCOUNT_INFO_FETCHER_IMPL_H_ | 74 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_CHILD_ACCOUNT_INFO_FETCHER_IMPL_H_ |
| OLD | NEW |