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

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

Issue 10915307: URLFetcher uses a TaskRunner instead of a message loop. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Changes to url_fetcher.h Created 8 years, 3 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 unified diff | Download patch
« 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 SetMaxRetries(int max_retries) OVERRIDE;
62 virtual int GetMaxRetries() const OVERRIDE; 62 virtual int GetMaxRetries() const OVERRIDE;
63 virtual base::TimeDelta GetBackoffDelay() const OVERRIDE; 63 virtual base::TimeDelta GetBackoffDelay() const OVERRIDE;
64 virtual void SaveResponseToFileAtPath( 64 virtual void SaveResponseToFileAtPath(
65 const FilePath& file_path, 65 const FilePath& file_path,
66 scoped_refptr<base::MessageLoopProxy> file_message_loop_proxy) OVERRIDE; 66 scoped_refptr<base::TaskRunner> file_task_runner) OVERRIDE;
67 virtual void SaveResponseToTemporaryFile( 67 virtual void SaveResponseToTemporaryFile(
68 scoped_refptr<base::MessageLoopProxy> file_message_loop_proxy) OVERRIDE; 68 scoped_refptr<base::TaskRunner> file_task_runner) OVERRIDE;
69 virtual HttpResponseHeaders* GetResponseHeaders() const OVERRIDE; 69 virtual HttpResponseHeaders* GetResponseHeaders() const OVERRIDE;
70 virtual HostPortPair GetSocketAddress() const OVERRIDE; 70 virtual HostPortPair GetSocketAddress() const OVERRIDE;
71 virtual bool WasFetchedViaProxy() const OVERRIDE; 71 virtual bool WasFetchedViaProxy() const OVERRIDE;
72 virtual void Start() OVERRIDE; 72 virtual void Start() OVERRIDE;
73 virtual const GURL& GetOriginalURL() const OVERRIDE; 73 virtual const GURL& GetOriginalURL() const OVERRIDE;
74 virtual const GURL& GetURL() const OVERRIDE; 74 virtual const GURL& GetURL() const OVERRIDE;
75 virtual const URLRequestStatus& GetStatus() const OVERRIDE; 75 virtual const URLRequestStatus& GetStatus() const OVERRIDE;
76 virtual int GetResponseCode() const OVERRIDE; 76 virtual int GetResponseCode() const OVERRIDE;
77 virtual const ResponseCookies& GetCookies() const OVERRIDE; 77 virtual const ResponseCookies& GetCookies() const OVERRIDE;
78 virtual bool FileErrorOccurred( 78 virtual bool FileErrorOccurred(
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 static int GetNumFetcherCores(); 112 static int GetNumFetcherCores();
113 113
114 const scoped_refptr<URLFetcherCore> core_; 114 const scoped_refptr<URLFetcherCore> core_;
115 115
116 DISALLOW_COPY_AND_ASSIGN(URLFetcherImpl); 116 DISALLOW_COPY_AND_ASSIGN(URLFetcherImpl);
117 }; 117 };
118 118
119 } // namespace net 119 } // namespace net
120 120
121 #endif // NET_URL_REQUEST_URL_FETCHER_IMPL_H_ 121 #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