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

Side by Side Diff: net/url_request/url_fetcher_impl.h

Issue 11464028: Introduce ERR_NETWORK_CHANGED and allow URLFetcher to automatically retry on that error. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed nits Created 8 years 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/url_request/url_fetcher_core.cc ('k') | net/url_request/url_fetcher_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file contains URLFetcher, a wrapper around URLRequest that handles 5 // This file contains URLFetcher, a wrapper around URLRequest that handles
6 // low-level details like thread safety, ref counting, and incremental buffer 6 // low-level details like thread safety, ref counting, and incremental buffer
7 // reading. This is useful for callers who simply want to get the data from a 7 // reading. This is useful for callers who simply want to get the data from a
8 // URL and don't care about all the nitty-gritty details. 8 // URL and don't care about all the nitty-gritty details.
9 // 9 //
10 // NOTE(willchan): Only one "IO" thread is supported for URLFetcher. This is a 10 // NOTE(willchan): Only one "IO" thread is supported for URLFetcher. This is a
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 HttpRequestHeaders* headers) const OVERRIDE; 51 HttpRequestHeaders* headers) const OVERRIDE;
52 virtual void SetRequestContext( 52 virtual void SetRequestContext(
53 URLRequestContextGetter* request_context_getter) OVERRIDE; 53 URLRequestContextGetter* request_context_getter) OVERRIDE;
54 virtual void SetFirstPartyForCookies( 54 virtual void SetFirstPartyForCookies(
55 const GURL& first_party_for_cookies) OVERRIDE; 55 const GURL& first_party_for_cookies) OVERRIDE;
56 virtual void SetURLRequestUserData( 56 virtual void SetURLRequestUserData(
57 const void* key, 57 const void* key,
58 const CreateDataCallback& create_data_callback) OVERRIDE; 58 const CreateDataCallback& create_data_callback) OVERRIDE;
59 virtual void SetStopOnRedirect(bool stop_on_redirect) OVERRIDE; 59 virtual void SetStopOnRedirect(bool stop_on_redirect) OVERRIDE;
60 virtual void SetAutomaticallyRetryOn5xx(bool retry) OVERRIDE; 60 virtual void SetAutomaticallyRetryOn5xx(bool retry) OVERRIDE;
61 virtual void SetMaxRetries(int max_retries) OVERRIDE; 61 virtual void SetMaxRetriesOn5xx(int max_retries) OVERRIDE;
62 virtual int GetMaxRetries() const OVERRIDE; 62 virtual int GetMaxRetriesOn5xx() const OVERRIDE;
63 virtual base::TimeDelta GetBackoffDelay() const OVERRIDE; 63 virtual base::TimeDelta GetBackoffDelay() const OVERRIDE;
64 virtual void SetAutomaticallyRetryOnNetworkChanges(int max_retries) OVERRIDE;
64 virtual void SaveResponseToFileAtPath( 65 virtual void SaveResponseToFileAtPath(
65 const FilePath& file_path, 66 const FilePath& file_path,
66 scoped_refptr<base::TaskRunner> file_task_runner) OVERRIDE; 67 scoped_refptr<base::TaskRunner> file_task_runner) OVERRIDE;
67 virtual void SaveResponseToTemporaryFile( 68 virtual void SaveResponseToTemporaryFile(
68 scoped_refptr<base::TaskRunner> file_task_runner) OVERRIDE; 69 scoped_refptr<base::TaskRunner> file_task_runner) OVERRIDE;
69 virtual HttpResponseHeaders* GetResponseHeaders() const OVERRIDE; 70 virtual HttpResponseHeaders* GetResponseHeaders() const OVERRIDE;
70 virtual HostPortPair GetSocketAddress() const OVERRIDE; 71 virtual HostPortPair GetSocketAddress() const OVERRIDE;
71 virtual bool WasFetchedViaProxy() const OVERRIDE; 72 virtual bool WasFetchedViaProxy() const OVERRIDE;
72 virtual void Start() OVERRIDE; 73 virtual void Start() OVERRIDE;
73 virtual const GURL& GetOriginalURL() const OVERRIDE; 74 virtual const GURL& GetOriginalURL() const OVERRIDE;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 static int GetNumFetcherCores(); 113 static int GetNumFetcherCores();
113 114
114 const scoped_refptr<URLFetcherCore> core_; 115 const scoped_refptr<URLFetcherCore> core_;
115 116
116 DISALLOW_COPY_AND_ASSIGN(URLFetcherImpl); 117 DISALLOW_COPY_AND_ASSIGN(URLFetcherImpl);
117 }; 118 };
118 119
119 } // namespace net 120 } // namespace net
120 121
121 #endif // NET_URL_REQUEST_URL_FETCHER_IMPL_H_ 122 #endif // NET_URL_REQUEST_URL_FETCHER_IMPL_H_
OLDNEW
« no previous file with comments | « net/url_request/url_fetcher_core.cc ('k') | net/url_request/url_fetcher_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698