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

Unified Diff: chrome/common/net/gaia/gaia_auth_fetcher.h

Issue 7121014: When a user logs into sync, the appropriate cookies are retrieved so that (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Uploading after sync merge Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/net/gaia/gaia_auth_consumer.h ('k') | chrome/common/net/gaia/gaia_auth_fetcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/net/gaia/gaia_auth_fetcher.h
===================================================================
--- chrome/common/net/gaia/gaia_auth_fetcher.h (revision 89823)
+++ chrome/common/net/gaia/gaia_auth_fetcher.h (working copy)
@@ -68,6 +68,9 @@
void StartGetUserInfo(const std::string& lsid,
const std::string& info_key);
+ // Start a TokenAuth request to pre-login the user with the given credentials.
+ void StartTokenAuth(const std::string& auth_token);
+
// Implementation of URLFetcher::Delegate
virtual void OnURLFetchComplete(const URLFetcher* source,
const GURL& url,
@@ -94,8 +97,10 @@
static const char kClientLoginCaptchaFormat[];
// The format of the POST body for IssueAuthToken.
static const char kIssueAuthTokenFormat[];
- // The format of the POSt body for GetUserInfo.
+ // The format of the POST body for GetUserInfo.
static const char kGetUserInfoFormat[];
+ // The format of the POST body for TokenAuth.
+ static const char kTokenAuthFormat[];
// Constants for parsing ClientLogin errors.
static const char kAccountDeletedError[];
@@ -121,6 +126,10 @@
const net::URLRequestStatus& status,
int response_code);
+ void OnTokenAuthFetched(const std::string& data,
+ const net::URLRequestStatus& status,
+ int response_code);
+
// Tokenize the results of a ClientLogin fetch.
static void ParseClientLoginResponse(const std::string& data,
std::string* sid,
@@ -161,6 +170,11 @@
// user information.
static std::string MakeGetUserInfoBody(const std::string& lsid);
+ // Supply the authentication token returned from StartIssueAuthToken.
+ static std::string MakeTokenAuthBody(const std::string& auth_token,
+ const std::string& continue_url,
+ const std::string& source);
+
// Create a fetcher useable for making any Gaia request.
static URLFetcher* CreateGaiaFetcher(net::URLRequestContextGetter* getter,
const std::string& body,
@@ -175,6 +189,7 @@
const GURL client_login_gurl_;
const GURL issue_auth_token_gurl_;
const GURL get_user_info_gurl_;
+ const GURL token_auth_gurl_;
// While a fetch is going on:
scoped_ptr<URLFetcher> fetcher_;
« no previous file with comments | « chrome/common/net/gaia/gaia_auth_consumer.h ('k') | chrome/common/net/gaia/gaia_auth_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698