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

Unified Diff: google_apis/gaia/gaia_auth_fetcher.h

Issue 424233002: When the user signs in, make sure to set cookies on all reachable google (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 6 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
« no previous file with comments | « google_apis/gaia/gaia_auth_consumer.h ('k') | google_apis/gaia/gaia_auth_fetcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: google_apis/gaia/gaia_auth_fetcher.h
diff --git a/google_apis/gaia/gaia_auth_fetcher.h b/google_apis/gaia/gaia_auth_fetcher.h
index aa66a49e03263aa61b15cbc6d72322938497c249..57afc22faadda3681dbb8fd03f404a8bdc25d076 100644
--- a/google_apis/gaia/gaia_auth_fetcher.h
+++ b/google_apis/gaia/gaia_auth_fetcher.h
@@ -148,9 +148,17 @@ class GaiaAuthFetcher : public net::URLFetcherDelegate {
// credentials represented by the account whose uber-auth token is
// |uber_token|. This method will modify the cookies of the current profile.
//
+ // The |external_cc_result| string can specify the result of connetion checks
+ // for various google properties, and MergeSession will set cookies on those
+ // properties too if appropriate. See StartGetCheckConnectionInfo() for
+ // details. The string is a comma separated list of token/result pairs, where
+ // token and result are separated by a colon. This string may be empty, in
+ // which case no specific handling is performed.
+ //
// Either OnMergeSessionSuccess or OnMergeSessionFailure will be
// called on the consumer on the original thread.
- void StartMergeSession(const std::string& uber_token);
+ void StartMergeSession(const std::string& uber_token,
+ const std::string& external_cc_result);
// Start a request to exchange an OAuthLogin-scoped oauth2 access token for an
// uber-auth token. The returned token can be used with the method
@@ -174,6 +182,11 @@ class GaiaAuthFetcher : public net::URLFetcherDelegate {
// Starts a request to list the accounts in the GAIA cookie.
void StartListAccounts();
+ // Starts a request to get the list of URLs to check for connection info.
+ // Returns token/URL pairs to check, and the resulting status can be given to
+ // /MergeSession requests.
+ void StartGetCheckConnectionInfo();
+
// Implementation of net::URLFetcherDelegate
virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE;
@@ -293,6 +306,10 @@ class GaiaAuthFetcher : public net::URLFetcherDelegate {
const net::URLRequestStatus& status,
int response_code);
+ void OnGetCheckConnectionInfoFetched(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,
@@ -342,8 +359,9 @@ class GaiaAuthFetcher : public net::URLFetcherDelegate {
// 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);
+ const std::string& external_cc_result,
+ const std::string& continue_url,
+ const std::string& source);
static std::string MakeGetAuthCodeHeader(const std::string& auth_token);
@@ -384,6 +402,7 @@ class GaiaAuthFetcher : public net::URLFetcherDelegate {
const GURL uberauth_token_gurl_;
const GURL oauth_login_gurl_;
const GURL list_accounts_gurl_;
+ const GURL get_check_connection_info_url_;
// While a fetch is going on:
scoped_ptr<net::URLFetcher> fetcher_;
« no previous file with comments | « google_apis/gaia/gaia_auth_consumer.h ('k') | google_apis/gaia/gaia_auth_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698