OLD | NEW |
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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 virtual void SetAutomaticallyRetryOn5xx(bool retry) OVERRIDE; | 66 virtual void SetAutomaticallyRetryOn5xx(bool retry) OVERRIDE; |
67 virtual void SetMaxRetriesOn5xx(int max_retries) OVERRIDE; | 67 virtual void SetMaxRetriesOn5xx(int max_retries) OVERRIDE; |
68 virtual int GetMaxRetriesOn5xx() const OVERRIDE; | 68 virtual int GetMaxRetriesOn5xx() const OVERRIDE; |
69 virtual base::TimeDelta GetBackoffDelay() const OVERRIDE; | 69 virtual base::TimeDelta GetBackoffDelay() const OVERRIDE; |
70 virtual void SetAutomaticallyRetryOnNetworkChanges(int max_retries) OVERRIDE; | 70 virtual void SetAutomaticallyRetryOnNetworkChanges(int max_retries) OVERRIDE; |
71 virtual void SaveResponseToFileAtPath( | 71 virtual void SaveResponseToFileAtPath( |
72 const base::FilePath& file_path, | 72 const base::FilePath& file_path, |
73 scoped_refptr<base::TaskRunner> file_task_runner) OVERRIDE; | 73 scoped_refptr<base::TaskRunner> file_task_runner) OVERRIDE; |
74 virtual void SaveResponseToTemporaryFile( | 74 virtual void SaveResponseToTemporaryFile( |
75 scoped_refptr<base::TaskRunner> file_task_runner) OVERRIDE; | 75 scoped_refptr<base::TaskRunner> file_task_runner) OVERRIDE; |
| 76 virtual void SaveResponseWithWriter( |
| 77 scoped_ptr<URLFetcherResponseWriter> response_writer) OVERRIDE; |
76 virtual HttpResponseHeaders* GetResponseHeaders() const OVERRIDE; | 78 virtual HttpResponseHeaders* GetResponseHeaders() const OVERRIDE; |
77 virtual HostPortPair GetSocketAddress() const OVERRIDE; | 79 virtual HostPortPair GetSocketAddress() const OVERRIDE; |
78 virtual bool WasFetchedViaProxy() const OVERRIDE; | 80 virtual bool WasFetchedViaProxy() const OVERRIDE; |
79 virtual void Start() OVERRIDE; | 81 virtual void Start() OVERRIDE; |
80 virtual const GURL& GetOriginalURL() const OVERRIDE; | 82 virtual const GURL& GetOriginalURL() const OVERRIDE; |
81 virtual const GURL& GetURL() const OVERRIDE; | 83 virtual const GURL& GetURL() const OVERRIDE; |
82 virtual const URLRequestStatus& GetStatus() const OVERRIDE; | 84 virtual const URLRequestStatus& GetStatus() const OVERRIDE; |
83 virtual int GetResponseCode() const OVERRIDE; | 85 virtual int GetResponseCode() const OVERRIDE; |
84 virtual const ResponseCookies& GetCookies() const OVERRIDE; | 86 virtual const ResponseCookies& GetCookies() const OVERRIDE; |
85 virtual void ReceivedContentWasMalformed() OVERRIDE; | 87 virtual void ReceivedContentWasMalformed() OVERRIDE; |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 static int GetNumFetcherCores(); | 120 static int GetNumFetcherCores(); |
119 | 121 |
120 const scoped_refptr<URLFetcherCore> core_; | 122 const scoped_refptr<URLFetcherCore> core_; |
121 | 123 |
122 DISALLOW_COPY_AND_ASSIGN(URLFetcherImpl); | 124 DISALLOW_COPY_AND_ASSIGN(URLFetcherImpl); |
123 }; | 125 }; |
124 | 126 |
125 } // namespace net | 127 } // namespace net |
126 | 128 |
127 #endif // NET_URL_REQUEST_URL_FETCHER_IMPL_H_ | 129 #endif // NET_URL_REQUEST_URL_FETCHER_IMPL_H_ |
OLD | NEW |