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_CONTENT_BROWSER_WALLET_WALLET_SIGNIN_HELPER_H_ | 5 #ifndef COMPONENTS_AUTOFILL_CONTENT_BROWSER_WALLET_WALLET_SIGNIN_HELPER_H_ |
6 #define COMPONENTS_AUTOFILL_CONTENT_BROWSER_WALLET_WALLET_SIGNIN_HELPER_H_ | 6 #define COMPONENTS_AUTOFILL_CONTENT_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" |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
97 virtual void OnIssueAuthTokenFailure( | 97 virtual void OnIssueAuthTokenFailure( |
98 const std::string& service, | 98 const std::string& service, |
99 const GoogleServiceAuthError& error) OVERRIDE; | 99 const GoogleServiceAuthError& error) OVERRIDE; |
100 | 100 |
101 // URLFetcherDelegate implementation. | 101 // URLFetcherDelegate implementation. |
102 virtual void OnURLFetchComplete(const net::URLFetcher* fetcher) OVERRIDE; | 102 virtual void OnURLFetchComplete(const net::URLFetcher* fetcher) OVERRIDE; |
103 | 103 |
104 // Initiates fetching of the currently signed-in user information. | 104 // Initiates fetching of the currently signed-in user information. |
105 void StartFetchingUserNameFromSession(); | 105 void StartFetchingUserNameFromSession(); |
106 | 106 |
107 // Processes the response to the passive sign-in (in url_fetcher_), | |
108 // and initiates fetching the user name on success or calls the delegate | |
ahutter
2013/06/13 23:52:10
|url_fetcher_|
aruslan
2013/06/18 21:21:47
Done; I removed both methods.
| |
109 // callback on failure. | |
110 void ProcessPassiveSignInResponseAndFetchUserName(); | |
111 | |
112 // Processes the response to the automatic sign-in (in url_fetcher_), | |
ahutter
2013/06/13 23:52:10
ditto
aruslan
2013/06/18 21:21:47
Done; I removed both methods.
| |
113 // and calls the delegate callbacks on success/failure. | |
114 void ProcessAutomaticSignInResponseAndFinish(); | |
115 | |
107 // Processes the user information received from the server by url_fetcher_ | 116 // Processes the user information received from the server by url_fetcher_ |
108 // and calls the delegate callbacks on success/failure. | 117 // and calls the delegate callbacks on success/failure. |
109 void ProcessGetAccountInfoResponseAndFinish(); | 118 void ProcessGetAccountInfoResponseAndFinish(); |
110 | 119 |
120 // Attempts to parse a response from the Online Wallet passive sign-in. | |
121 // Returns true if the response is correct and the sign-in has succeeded. | |
122 // Otherwise, it returns false and sets |error| accordingly. | |
123 bool ParsePassiveSignInResponse(GoogleServiceAuthError* error); | |
124 | |
111 // Attempts to parse the GetAccountInfo response from the server. | 125 // Attempts to parse the GetAccountInfo response from the server. |
112 // Returns true on success; the obtained email address is stored into |email|. | 126 // Returns true on success; the obtained email address is stored into |email|. |
113 bool ParseGetAccountInfoResponse(const net::URLFetcher* fetcher, | 127 bool ParseGetAccountInfoResponse(const net::URLFetcher* fetcher, |
114 std::string* email); | 128 std::string* email); |
115 | 129 |
116 // Should be valid throughout the lifetime of the instance. | 130 // Should be valid throughout the lifetime of the instance. |
117 WalletSigninHelperDelegate* const delegate_; | 131 WalletSigninHelperDelegate* const delegate_; |
118 | 132 |
119 // URLRequestContextGetter to be used for URLFetchers. | 133 // URLRequestContextGetter to be used for URLFetchers. |
120 net::URLRequestContextGetter* const getter_; | 134 net::URLRequestContextGetter* const getter_; |
(...skipping 16 matching lines...) Expand all Loading... | |
137 // Current internal state of the helper. | 151 // Current internal state of the helper. |
138 State state_; | 152 State state_; |
139 | 153 |
140 DISALLOW_COPY_AND_ASSIGN(WalletSigninHelper); | 154 DISALLOW_COPY_AND_ASSIGN(WalletSigninHelper); |
141 }; | 155 }; |
142 | 156 |
143 } // namespace wallet | 157 } // namespace wallet |
144 } // namespace autofill | 158 } // namespace autofill |
145 | 159 |
146 #endif // COMPONENTS_AUTOFILL_CONTENT_BROWSER_WALLET_WALLET_SIGNIN_HELPER_H_ | 160 #endif // COMPONENTS_AUTOFILL_CONTENT_BROWSER_WALLET_WALLET_SIGNIN_HELPER_H_ |
OLD | NEW |