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

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

Issue 9465018: Changes to the GAIA auth fetching to support one-click login. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Removed DCHECKS, fixed typo 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
===================================================================
--- chrome/common/net/gaia/gaia_auth_fetcher.h (revision 124404)
+++ chrome/common/net/gaia/gaia_auth_fetcher.h (working copy)
@@ -30,7 +30,6 @@
namespace net {
class URLRequestContextGetter;
class URLRequestStatus;
-typedef std::vector<std::string> ResponseCookies;
}
class GaiaAuthFetcher : public content::URLFetcherDelegate {
@@ -89,7 +88,8 @@
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.
+ // be an OAuth2 valid access token. If |access_token| is an empty string,
+ // then the cookie jar is used with the request.
void StartUberAuthTokenFetch(const std::string& access_token);
// Implementation of content::URLFetcherDelegate
@@ -182,7 +182,8 @@
const net::URLRequestStatus& status,
int response_code);
- void OnTokenAuthFetched(const std::string& data,
+ void OnTokenAuthFetched(const net::ResponseCookies& cookies,
+ const std::string& data,
const net::URLRequestStatus& status,
int response_code);
@@ -259,13 +260,18 @@
void StartOAuth2TokenPairFetch(const std::string& auth_code);
- // Create a fetcher useable for making any Gaia request.
+ // Create a fetcher usable for making any Gaia request. |body| is used
+ // as the body of the POST request sent to GAIA. Any strings listed in
+ // |headers| are added as extra HTTP headers in the request.
+ //
+ // |load_flags| are passed to directly to content::URLFetcher::Create() when
+ // creating the URL fetcher.
static content::URLFetcher* CreateGaiaFetcher(
net::URLRequestContextGetter* getter,
const std::string& body,
const std::string& headers,
const GURL& gaia_gurl,
- bool use_cookies,
+ int load_flags,
content::URLFetcherDelegate* delegate);
// From a URLFetcher result, generate an appropriate error.
« 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