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

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: Copyright. Created 8 years, 10 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
diff --git a/chrome/common/net/gaia/gaia_auth_fetcher.h b/chrome/common/net/gaia/gaia_auth_fetcher.h
index fa4d3cc9f1866ab1e5c5b68f664e15255f07bb0f..56bae60719d780d51218cf193662d369458e0f94 100644
--- a/chrome/common/net/gaia/gaia_auth_fetcher.h
+++ b/chrome/common/net/gaia/gaia_auth_fetcher.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -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_;
« 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