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

Unified Diff: chrome/browser/google/google_url_tracker.cc

Issue 4194001: Implement exponential back-off mechanism and enforce it at the URLRequestHttpJob level. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 1 month 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 | « no previous file | chrome/chrome_common.gypi » ('j') | net/request_throttler/request_throttler_entry.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/google/google_url_tracker.cc
===================================================================
--- chrome/browser/google/google_url_tracker.cc (revision 64189)
+++ chrome/browser/google/google_url_tracker.cc (working copy)
@@ -19,7 +19,6 @@
#include "chrome/browser/tab_contents/navigation_controller.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/common/chrome_switches.h"
-#include "chrome/common/net/url_fetcher_protect.h"
#include "chrome/common/notification_service.h"
#include "chrome/common/pref_names.h"
#include "grit/generated_resources.h"
@@ -116,13 +115,6 @@
net::NetworkChangeNotifier::AddObserver(this);
- // Configure to max_retries at most kMaxRetries times for 5xx errors.
- URLFetcherProtectEntry* protect =
- URLFetcherProtectManager::GetInstance()->Register(
- GURL(kSearchDomainCheckURL).host());
- static const int kMaxRetries = 5;
- protect->SetMaxRetries(kMaxRetries);
-
// Because this function can be called during startup, when kicking off a URL
// fetch can eat up 20 ms of time, we delay five seconds, which is hopefully
// long enough to be after startup, but still get results back quickly.
@@ -204,6 +196,11 @@
fetcher_->set_load_flags(net::LOAD_DISABLE_CACHE |
net::LOAD_DO_NOT_SAVE_COOKIES);
fetcher_->set_request_context(Profile::GetDefaultRequestContext());
+
+ // Configure to max_retries at most kMaxRetries times for 5xx errors.
+ static const int kMaxRetries = 5;
+ fetcher_->set_max_retries(kMaxRetries);
+
fetcher_->Start();
}
« no previous file with comments | « no previous file | chrome/chrome_common.gypi » ('j') | net/request_throttler/request_throttler_entry.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698