diff options
author | joaodasilva@chromium.org <joaodasilva@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-04 23:15:33 +0000 |
---|---|---|
committer | joaodasilva@chromium.org <joaodasilva@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-04 23:15:33 +0000 |
commit | 9d7a393e71d5f0eef42500552e770709506050ae (patch) | |
tree | 7b821244b11bfa96eef1c64a102570682ddef976 /google_apis/gaia/gaia_auth_fetcher.cc | |
parent | d32024d7ddcc198b7f983d0b443492859e1f3036 (diff) | |
download | chromium_src-9d7a393e71d5f0eef42500552e770709506050ae.zip chromium_src-9d7a393e71d5f0eef42500552e770709506050ae.tar.gz chromium_src-9d7a393e71d5f0eef42500552e770709506050ae.tar.bz2 |
Make gaia and oauth token fetchers recover from ERR_NETWORK_CHANGED.
This net error occurs frequently during ChromeOS sign-in when tokens are being
fetched, due to network change notifications triggered by the network library,
the portal detector and sometimes proxy configuration changes.
BUG=173671
Review URL: https://chromiumcodereview.appspot.com/12161003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@180550 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'google_apis/gaia/gaia_auth_fetcher.cc')
-rw-r--r-- | google_apis/gaia/gaia_auth_fetcher.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/google_apis/gaia/gaia_auth_fetcher.cc b/google_apis/gaia/gaia_auth_fetcher.cc index 853e6c9..b4f7df6 100644 --- a/google_apis/gaia/gaia_auth_fetcher.cc +++ b/google_apis/gaia/gaia_auth_fetcher.cc @@ -227,6 +227,12 @@ net::URLFetcher* GaiaAuthFetcher::CreateGaiaFetcher( // explicitly. to_return->SetLoadFlags(load_flags); + // 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 + to_return->SetAutomaticallyRetryOnNetworkChanges(3); + if (!headers.empty()) to_return->SetExtraRequestHeaders(headers); |