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

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

Issue 9301003: Change X-Auto-Login implementation to use OAuth token. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Follow review Created 8 years, 11 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
Index: chrome/common/net/gaia/gaia_auth_fetcher.h
diff --git a/chrome/common/net/gaia/gaia_auth_fetcher.h b/chrome/common/net/gaia/gaia_auth_fetcher.h
index fa4d3cc9f1866ab1e5c5b68f664e15255f07bb0f..3abf5a682766ec758f70357847fbe618152e05f9 100644
--- a/chrome/common/net/gaia/gaia_auth_fetcher.h
+++ b/chrome/common/net/gaia/gaia_auth_fetcher.h
@@ -89,6 +89,10 @@ class GaiaAuthFetcher : public content::URLFetcherDelegate {
// existing accounts.
void StartMergeSession(const std::string& auth_token);
+ // Start a request to get an uber-auth token. The given |access_token| must
+ // be an OAuth2 valid access token.
+ void StartUberAuthTokenFetch(const std::string& access_token);
+
// Implementation of content::URLFetcherDelegate
virtual void OnURLFetchComplete(const content::URLFetcher* source) OVERRIDE;
@@ -127,6 +131,8 @@ class GaiaAuthFetcher : public content::URLFetcherDelegate {
static const char kTokenAuthFormat[];
// The format of the POST body for MergeSession.
static const char kMergeSessionFormat[];
+ // The format of the URL for UberAuthToken.
+ static const char kUberAuthTokenURLFormat[];
// Constants for parsing ClientLogin errors.
static const char kAccountDeletedError[];
@@ -146,6 +152,7 @@ class GaiaAuthFetcher : public content::URLFetcherDelegate {
// Constants for request/response for OAuth2 requests.
static const char kAuthHeaderFormat[];
+ static const char kOAuthHeaderFormat[];
static const char kClientLoginToOAuth2CookiePartSecure[];
static const char kClientLoginToOAuth2CookiePartHttpOnly[];
static const char kClientLoginToOAuth2CookiePartCodePrefix[];
@@ -184,6 +191,10 @@ class GaiaAuthFetcher : public content::URLFetcherDelegate {
const net::URLRequestStatus& status,
int response_code);
+ void OnUberAuthTokenFetch(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,
@@ -276,6 +287,7 @@ class GaiaAuthFetcher : public content::URLFetcherDelegate {
const GURL get_user_info_gurl_;
const GURL token_auth_gurl_;
const GURL merge_session_gurl_;
+ const GURL uberauth_token_gurl_;
// While a fetch is going on:
scoped_ptr<content::URLFetcher> fetcher_;

Powered by Google App Engine
This is Rietveld 408576698