diff options
author | rogerta@chromium.org <rogerta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-16 23:11:09 +0000 |
---|---|---|
committer | rogerta@chromium.org <rogerta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-16 23:11:09 +0000 |
commit | fcdc73f35abd477bb4c0953c8164f77f7877fdb4 (patch) | |
tree | 77f92c27f544f998ac215e94834099019c88b6c2 /google_apis/gaia | |
parent | 8844fc28f7452ca90f3a9435db9d15edbb358d59 (diff) | |
download | chromium_src-fcdc73f35abd477bb4c0953c8164f77f7877fdb4.zip chromium_src-fcdc73f35abd477bb4c0953c8164f77f7877fdb4.tar.gz chromium_src-fcdc73f35abd477bb4c0953c8164f77f7877fdb4.tar.bz2 |
GaiaOAuthClient::Core::GetUserInfo() does not need to send or receive cookies.
The function should set the load flags to ignore cookies.
BUG=327120
Review URL: https://codereview.chromium.org/98403011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@241058 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'google_apis/gaia')
-rw-r--r-- | google_apis/gaia/gaia_oauth_client.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/google_apis/gaia/gaia_oauth_client.cc b/google_apis/gaia/gaia_oauth_client.cc index dc83dbe..8c6e180 100644 --- a/google_apis/gaia/gaia_oauth_client.cc +++ b/google_apis/gaia/gaia_oauth_client.cc @@ -11,6 +11,7 @@ #include "base/values.h" #include "google_apis/gaia/gaia_urls.h" #include "net/base/escape.h" +#include "net/base/load_flags.h" #include "net/http/http_status_code.h" #include "net/url_request/url_fetcher.h" #include "net/url_request/url_fetcher_delegate.h" @@ -167,6 +168,9 @@ void GaiaOAuthClient::Core::GetUserInfo(const std::string& oauth_access_token, request_->SetRequestContext(request_context_getter_.get()); request_->AddExtraRequestHeader("Authorization: OAuth " + oauth_access_token); request_->SetMaxRetriesOn5xx(max_retries); + request_->SetLoadFlags(net::LOAD_DO_NOT_SEND_COOKIES | + net::LOAD_DO_NOT_SAVE_COOKIES); + // Fetchers are sometimes cancelled because a network change was detected, // especially at startup and after sign-in on ChromeOS. Retrying once should // be enough in those cases; let the fetcher retry up to 3 times just in case. @@ -202,6 +206,8 @@ void GaiaOAuthClient::Core::MakeGaiaRequest( request_->SetRequestContext(request_context_getter_.get()); request_->SetUploadData("application/x-www-form-urlencoded", post_body); request_->SetMaxRetriesOn5xx(max_retries); + request_->SetLoadFlags(net::LOAD_DO_NOT_SEND_COOKIES | + net::LOAD_DO_NOT_SAVE_COOKIES); // See comment on SetAutomaticallyRetryOnNetworkChanges() above. request_->SetAutomaticallyRetryOnNetworkChanges(3); request_->Start(); |