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

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

Issue 7600003: Pre- and Auto-login should not log the user out of an already signed in (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 4 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
===================================================================
--- chrome/common/net/gaia/gaia_auth_fetcher.h (revision 95804)
+++ chrome/common/net/gaia/gaia_auth_fetcher.h (working copy)
@@ -71,6 +71,11 @@
// Start a TokenAuth request to pre-login the user with the given credentials.
void StartTokenAuth(const std::string& auth_token);
+ // Start a MergeSession request to pre-login the user with the given
+ // credentials. Unlike TokenAuth above, MergeSession will not sign out any
+ // existing accounts.
+ void StartMergeSession(const std::string& auth_token);
+
// Implementation of URLFetcher::Delegate
virtual void OnURLFetchComplete(const URLFetcher* source,
const GURL& url,
@@ -108,6 +113,8 @@
static const char kGetUserInfoFormat[];
// The format of the POST body for TokenAuth.
static const char kTokenAuthFormat[];
+ // The format of the POST body for MergeSession.
+ static const char kMergeSessionFormat[];
// Constants for parsing ClientLogin errors.
static const char kAccountDeletedError[];
@@ -142,6 +149,10 @@
const net::URLRequestStatus& status,
int response_code);
+ void OnMergeSessionFetched(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,
@@ -180,7 +191,21 @@
const std::string& continue_url,
const std::string& source);
+ // Supply the authentication token returned from StartIssueAuthToken.
+ static std::string MakeMergeSessionBody(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* CreateGaiaFetcherWithFlags(
Rick Campbell 2011/08/08 21:24:51 In the context of authentication code, I prefer a
Roger Tawa OOO till Jul 10th 2011/08/09 20:50:49 Done.
+ net::URLRequestContextGetter* getter,
+ const std::string& body,
+ const GURL& gaia_gurl,
+ int flags,
+ URLFetcher::Delegate* delegate);
+
+ // Create a fetcher useable for making any Gaia request. The flags
+ // net::LOAD_DO_NOT_SEND_COOKIES are used when creating the fetcher.
static URLFetcher* CreateGaiaFetcher(net::URLRequestContextGetter* getter,
const std::string& body,
const GURL& gaia_gurl_,
@@ -201,6 +226,7 @@
const GURL issue_auth_token_gurl_;
const GURL get_user_info_gurl_;
const GURL token_auth_gurl_;
+ const GURL merge_session_gurl_;
// While a fetch is going on:
scoped_ptr<URLFetcher> fetcher_;

Powered by Google App Engine
This is Rietveld 408576698