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

Unified Diff: chrome/common/net/gaia/gaia_oauth_client.cc

Issue 6966038: Anti-DDoS enhancements: Log to net log, UMA stats, improved policy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head. Created 9 years, 7 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/browser/net/passive_log_collector.cc ('k') | chrome/common/net/url_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_oauth_client.cc
diff --git a/chrome/common/net/gaia/gaia_oauth_client.cc b/chrome/common/net/gaia/gaia_oauth_client.cc
index 002821dc62f7ff08613f02c4d856f190ddadb04e..cab666d171e37bdaa92e9ab3f25cb2897fac3f20 100644
--- a/chrome/common/net/gaia/gaia_oauth_client.cc
+++ b/chrome/common/net/gaia/gaia_oauth_client.cc
@@ -123,12 +123,11 @@ void GaiaOAuthClient::Core::OnURLFetchComplete(
bool should_retry = false;
HandleResponse(source, url, status, response_code, data, &should_retry);
if (should_retry) {
- // If the response code is greater than or equal to 500, then the back-off
- // period has been increased at the network level; otherwise, explicitly
- // call ReceivedContentWasMalformed() to count the current request as a
- // failure and increase the back-off period.
- if (response_code < 500)
- request_->ReceivedContentWasMalformed();
+ // Explicitly call ReceivedContentWasMalformed() to ensure the current
+ // request gets counted as a failure for calculation of the back-off
+ // period. If it was already a failure by status code, this call will
+ // be ignored.
+ request_->ReceivedContentWasMalformed();
num_retries_++;
request_->Start();
} else {
« no previous file with comments | « chrome/browser/net/passive_log_collector.cc ('k') | chrome/common/net/url_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698