diff options
author | joaodasilva@chromium.org <joaodasilva@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-14 22:44:30 +0000 |
---|---|---|
committer | joaodasilva@chromium.org <joaodasilva@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-14 22:44:30 +0000 |
commit | a1232a184ed9060db8bb7aa8e3225ae4475195ea (patch) | |
tree | 5bd5597229a2fb64c257a910306235cda947f62a /google_apis | |
parent | ff33950c2340b384ce9222c0a460ef828b2ef1e3 (diff) | |
download | chromium_src-a1232a184ed9060db8bb7aa8e3225ae4475195ea.zip chromium_src-a1232a184ed9060db8bb7aa8e3225ae4475195ea.tar.gz chromium_src-a1232a184ed9060db8bb7aa8e3225ae4475195ea.tar.bz2 |
Automatically retry the following URLFetchers when the network changes:
extensions_downloader.cc (extensions, retail mode AppPack)
gaia_oauth_fetcher.cc
gaia_oauth_client.cc
device_management_service.cc (user/device policy fetches, auto-enrollment)
All of these have been noticed to fail when network change notifications are sent, in particular on ChromeOS.
TBR=jochen
BUG=145021,163710,130602,chromium-os:16114
Review URL: https://codereview.chromium.org/11572044
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173232 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'google_apis')
-rw-r--r-- | google_apis/gaia/gaia_oauth_client.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/google_apis/gaia/gaia_oauth_client.cc b/google_apis/gaia/gaia_oauth_client.cc index 1adefb8..a9bae4f 100644 --- a/google_apis/gaia/gaia_oauth_client.cc +++ b/google_apis/gaia/gaia_oauth_client.cc @@ -129,6 +129,11 @@ void GaiaOAuthClient::Core::GetUserInfo(const std::string& oauth_access_token, request_->AddExtraRequestHeader( "Authorization: OAuth " + oauth_access_token); request_->SetMaxRetriesOn5xx(max_retries); + // 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. + // http://crbug.com/163710 + request_->SetAutomaticallyRetryOnNetworkChanges(3); request_->Start(); } @@ -144,6 +149,8 @@ void GaiaOAuthClient::Core::MakeGaiaRequest( request_->SetRequestContext(request_context_getter_); request_->SetUploadData("application/x-www-form-urlencoded", post_body); request_->SetMaxRetriesOn5xx(max_retries); + // See comment on SetAutomaticallyRetryOnNetworkChanges() above. + request_->SetAutomaticallyRetryOnNetworkChanges(3); request_->Start(); } |