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

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

Issue 5276007: Implement exponential back-off mechanism. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: pull latest to merge 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') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/google/google_url_tracker.cc
diff --git a/chrome/browser/google/google_url_tracker.cc b/chrome/browser/google/google_url_tracker.cc
index 9b06e33aa622434fed8011870afa288f8d568b69..e4f5edbde6e2ac9b89097dc7f95309dad28ef8d3 100644
--- a/chrome/browser/google/google_url_tracker.cc
+++ b/chrome/browser/google/google_url_tracker.cc
@@ -18,7 +18,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"
@@ -112,13 +111,6 @@ GoogleURLTracker::GoogleURLTracker()
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);
-
MessageLoop::current()->PostTask(FROM_HERE,
runnable_method_factory_.NewRunnableMethod(
&GoogleURLTracker::QueueWakeupTask));
@@ -211,6 +203,11 @@ void GoogleURLTracker::StartFetchIfDesirable() {
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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698