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

Unified Diff: chrome/browser/local_discovery/privet_url_fetcher.h

Issue 1417363004: Verify certificate of Privet v3 device (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
Index: chrome/browser/local_discovery/privet_url_fetcher.h
diff --git a/chrome/browser/local_discovery/privet_url_fetcher.h b/chrome/browser/local_discovery/privet_url_fetcher.h
index b468c24b55b28a009be4101f19d37ac654fd5ce7..20357915212e4730970d83bd9f4740a68ac6058e 100644
--- a/chrome/browser/local_discovery/privet_url_fetcher.h
+++ b/chrome/browser/local_discovery/privet_url_fetcher.h
@@ -28,10 +28,10 @@ class PrivetURLFetcher : public net::URLFetcherDelegate {
public:
enum ErrorType {
JSON_PARSE_ERROR,
- URL_FETCH_ERROR,
+ REQUEST_CANCELED,
RESPONSE_CODE_ERROR,
- RETRY_ERROR,
- TOKEN_ERROR
+ TOKEN_ERROR,
+ UNKNOWN_ERROR,
};
typedef base::Callback<void(const std::string& /*token*/)> TokenCallback;
@@ -66,7 +66,7 @@ class PrivetURLFetcher : public net::URLFetcherDelegate {
PrivetURLFetcher(
const GURL& url,
net::URLFetcher::RequestType request_type,
- net::URLRequestContextGetter* request_context,
+ const scoped_refptr<net::URLRequestContextGetter>& context_getter,
Delegate* delegate);
~PrivetURLFetcher() override;
@@ -79,6 +79,8 @@ class PrivetURLFetcher : public net::URLFetcherDelegate {
static void ResetTokenMapForTests();
+ void SetMaxRetries(int max_retries);
+
void DoNotRetryOnTransientError();
void SendEmptyPrivetToken();
@@ -118,9 +120,10 @@ class PrivetURLFetcher : public net::URLFetcherDelegate {
GURL url_;
net::URLFetcher::RequestType request_type_;
- scoped_refptr<net::URLRequestContextGetter> request_context_;
+ scoped_refptr<net::URLRequestContextGetter> context_getter_;
Delegate* delegate_;
+ int max_retries_;
bool do_not_retry_on_transient_error_;
bool send_empty_privet_token_;
bool has_byte_range_;

Powered by Google App Engine
This is Rietveld 408576698