Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(296)

Side by Side Diff: components/autofill/content/browser/wallet/wallet_signin_helper.h

Issue 16858016: Respect the new Online Wallet sign-in response. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698