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

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

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_script.cc ('k') | chrome/browser/translate/translate_url_fetcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/translate/translate_url_fetcher.h
diff --git a/chrome/browser/translate/translate_url_fetcher.h b/chrome/browser/translate/translate_url_fetcher.h
index 7124f0bee6021cffcd43cd9ff803cc5c418ce97e..9570ba2a14cf1040fa5eb1fad16f92eeb260620f 100644
--- a/chrome/browser/translate/translate_url_fetcher.h
+++ b/chrome/browser/translate/translate_url_fetcher.h
@@ -26,6 +26,20 @@ class TranslateURLFetcher : public net::URLFetcherDelegate {
explicit TranslateURLFetcher(int id);
virtual ~TranslateURLFetcher();
+ int max_retry_on_5xx() {
+ return max_retry_on_5xx_;
+ }
+ void set_max_retry_on_5xx(int count) {
+ max_retry_on_5xx_ = count;
+ }
+
+ const std::string& extra_request_header() {
+ return extra_request_header_;
+ }
+ void set_extra_request_header(const std::string& header) {
+ extra_request_header_ = header;
+ }
+
// Requests to |url|. |callback| will be invoked when the function returns
// true, and the request is finished asynchronously.
// Returns false if the previous request is not finished, or the request
@@ -58,6 +72,12 @@ class TranslateURLFetcher : public net::URLFetcherDelegate {
// Counts how many times did it try to fetch the language list.
int retry_count_;
+ // Max number how many times to retry on the server error
+ int max_retry_on_5xx_;
+
+ // An extra HTTP request header
+ std::string extra_request_header_;
+
DISALLOW_COPY_AND_ASSIGN(TranslateURLFetcher);
};
« no previous file with comments | « chrome/browser/translate/translate_script.cc ('k') | chrome/browser/translate/translate_url_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698