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

Unified Diff: chrome/browser/net/gaia/gaia_oauth_fetcher.cc

Issue 11572044: Automatically retry the following URLFetchers when the network changes: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Document the retry behavior Created 8 years 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/browser/extensions/updater/extension_downloader.cc ('k') | chrome/browser/policy/app_pack_updater.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/gaia/gaia_oauth_fetcher.cc
diff --git a/chrome/browser/net/gaia/gaia_oauth_fetcher.cc b/chrome/browser/net/gaia/gaia_oauth_fetcher.cc
index a42aa891ae784d53a89b72b256ad53e7a6cf12fd..521e0d89702bf87b248b2e7a581da7844b4de739 100644
--- a/chrome/browser/net/gaia/gaia_oauth_fetcher.cc
+++ b/chrome/browser/net/gaia/gaia_oauth_fetcher.cc
@@ -63,6 +63,11 @@ net::URLFetcher* GaiaOAuthFetcher::CreateGaiaFetcher(
empty_body ? net::URLFetcher::GET : net::URLFetcher::POST,
delegate);
result->SetRequestContext(getter);
+ // 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
+ result->SetAutomaticallyRetryOnNetworkChanges(3);
// The Gaia/OAuth token exchange requests do not require any cookie-based
// identification as part of requests. We suppress sending any cookies to
« no previous file with comments | « chrome/browser/extensions/updater/extension_downloader.cc ('k') | chrome/browser/policy/app_pack_updater.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698