| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_AUTOFILL_BROWSER_WALLET_WALLET_SIGNIN_HELPER_H_ | 5 #ifndef COMPONENTS_AUTOFILL_BROWSER_WALLET_WALLET_SIGNIN_HELPER_H_ |
| 6 #define COMPONENTS_AUTOFILL_BROWSER_WALLET_WALLET_SIGNIN_HELPER_H_ | 6 #define COMPONENTS_AUTOFILL_BROWSER_WALLET_WALLET_SIGNIN_HELPER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
| 12 #include "components/autofill/common/autofill_export.h" |
| 12 #include "google_apis/gaia/gaia_auth_consumer.h" | 13 #include "google_apis/gaia/gaia_auth_consumer.h" |
| 13 #include "net/url_request/url_fetcher_delegate.h" | 14 #include "net/url_request/url_fetcher_delegate.h" |
| 14 | 15 |
| 15 namespace net { | 16 namespace net { |
| 16 class URLFetcher; | 17 class URLFetcher; |
| 17 class URLRequestContextGetter; | 18 class URLRequestContextGetter; |
| 18 class URLRequestStatus; | 19 class URLRequestStatus; |
| 19 } | 20 } |
| 20 | 21 |
| 21 class GaiaAuthFetcher; | 22 class GaiaAuthFetcher; |
| 22 class GoogleServiceAuthError; | 23 class GoogleServiceAuthError; |
| 23 | 24 |
| 24 namespace autofill { | 25 namespace autofill { |
| 25 namespace wallet { | 26 namespace wallet { |
| 26 | 27 |
| 27 class WalletSigninHelperDelegate; | 28 class WalletSigninHelperDelegate; |
| 28 | 29 |
| 29 // Authenticates the user against the Online Wallet service. | 30 // Authenticates the user against the Online Wallet service. |
| 30 // This class is not thread-safe. An instance may be used on any thread, but | 31 // This class is not thread-safe. An instance may be used on any thread, but |
| 31 // should not be accessed from multiple threads. | 32 // should not be accessed from multiple threads. |
| 32 class WalletSigninHelper : public GaiaAuthConsumer, | 33 class AUTOFILL_EXPORT WalletSigninHelper |
| 33 public net::URLFetcherDelegate { | 34 : NON_EXPORTED_BASE(public GaiaAuthConsumer), |
| 35 public net::URLFetcherDelegate { |
| 34 public: | 36 public: |
| 35 // Constructs a helper that works with a given |delegate| and uses | 37 // Constructs a helper that works with a given |delegate| and uses |
| 36 // a given |getter| to obtain a context for URL and GAIA fetchers. | 38 // a given |getter| to obtain a context for URL and GAIA fetchers. |
| 37 // Both |delegate| and |getter| shall remain valid over the entire | 39 // Both |delegate| and |getter| shall remain valid over the entire |
| 38 // lifetime of the created instance. | 40 // lifetime of the created instance. |
| 39 WalletSigninHelper(WalletSigninHelperDelegate* delegate, | 41 WalletSigninHelper(WalletSigninHelperDelegate* delegate, |
| 40 net::URLRequestContextGetter* getter); | 42 net::URLRequestContextGetter* getter); |
| 41 | 43 |
| 42 virtual ~WalletSigninHelper(); | 44 virtual ~WalletSigninHelper(); |
| 43 | 45 |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 // Current internal state of the helper. | 139 // Current internal state of the helper. |
| 138 State state_; | 140 State state_; |
| 139 | 141 |
| 140 DISALLOW_COPY_AND_ASSIGN(WalletSigninHelper); | 142 DISALLOW_COPY_AND_ASSIGN(WalletSigninHelper); |
| 141 }; | 143 }; |
| 142 | 144 |
| 143 } // namespace wallet | 145 } // namespace wallet |
| 144 } // namespace autofill | 146 } // namespace autofill |
| 145 | 147 |
| 146 #endif // COMPONENTS_AUTOFILL_BROWSER_WALLET_WALLET_SIGNIN_HELPER_H_ | 148 #endif // COMPONENTS_AUTOFILL_BROWSER_WALLET_WALLET_SIGNIN_HELPER_H_ |
| OLD | NEW |