| 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_;
|
|
|