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

Unified Diff: chrome/browser/translate/translate_url_fetcher.cc

Issue 17390018: Refactoring: Create TranslateScript from TranslateManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@refactoring-translate-url-fetcher
Patch Set: Removed the nits Created 7 years, 6 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/translate/translate_url_fetcher.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/translate/translate_url_fetcher.cc
diff --git a/chrome/browser/translate/translate_url_fetcher.cc b/chrome/browser/translate/translate_url_fetcher.cc
index 16ee14f0b27a85518ccda07a1dabc8fd217cfed0..ba3204668be7e42cb4752aa14b1a4c4b76bb53df 100644
--- a/chrome/browser/translate/translate_url_fetcher.cc
+++ b/chrome/browser/translate/translate_url_fetcher.cc
@@ -13,7 +13,6 @@
namespace {
// Retry parameter for fetching.
-const int kMaxRetryOn5xx = 5;
const int kMaxRetry = 16;
} // namespace
@@ -56,7 +55,10 @@ bool TranslateURLFetcher::Request(
// Set retry parameter for HTTP status code 5xx. This doesn't work against
// 106 (net::ERR_INTERNET_DISCONNECTED) and so on.
// TranslateLanguageList handles network status, and implements retry.
- fetcher_->SetMaxRetriesOn5xx(kMaxRetryOn5xx);
+ fetcher_->SetMaxRetriesOn5xx(max_retry_on_5xx_);
+ if (!extra_request_header_.empty())
+ fetcher_->SetExtraRequestHeaders(extra_request_header_);
+
fetcher_->Start();
return true;
« no previous file with comments | « chrome/browser/translate/translate_url_fetcher.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698