Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 net::URLRequest that handles | 5 // This file contains URLFetcher, a wrapper around net::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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 132 void set_upload_data(const std::string& upload_content_type, | 132 void set_upload_data(const std::string& upload_content_type, |
| 133 const std::string& upload_content); | 133 const std::string& upload_content); |
| 134 | 134 |
| 135 // Set one or more load flags as defined in net/base/load_flags.h. Must be | 135 // Set one or more load flags as defined in net/base/load_flags.h. Must be |
| 136 // called before the request is started. | 136 // called before the request is started. |
| 137 void set_load_flags(int load_flags); | 137 void set_load_flags(int load_flags); |
| 138 | 138 |
| 139 // Returns the current load flags. | 139 // Returns the current load flags. |
| 140 int load_flags() const; | 140 int load_flags() const; |
| 141 | 141 |
| 142 // The referrer URL for the request, to be set before Start() is called. | |
|
wtc
2011/01/19 22:22:02
Nit: I suggest you copy the same sentence
Must
Satish
2011/01/20 11:04:12
Done.
| |
| 143 void set_referrer(const std::string& referrer); | |
| 144 | |
| 142 // Set extra headers on the request. Must be called before the request | 145 // Set extra headers on the request. Must be called before the request |
| 143 // is started. | 146 // is started. |
| 144 void set_extra_request_headers(const std::string& extra_request_headers); | 147 void set_extra_request_headers(const std::string& extra_request_headers); |
| 145 | 148 |
| 146 // Set the net::URLRequestContext on the request. Must be called before the | 149 // Set the net::URLRequestContext on the request. Must be called before the |
| 147 // request is started. | 150 // request is started. |
| 148 void set_request_context( | 151 void set_request_context( |
| 149 URLRequestContextGetter* request_context_getter); | 152 URLRequestContextGetter* request_context_getter); |
| 150 | 153 |
| 151 // If |retry| is false, 5xx responses will be propagated to the observer, | 154 // If |retry| is false, 5xx responses will be propagated to the observer, |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 213 base::TimeDelta backoff_delay_; | 216 base::TimeDelta backoff_delay_; |
| 214 // Maximum retries allowed. | 217 // Maximum retries allowed. |
| 215 int max_retries_; | 218 int max_retries_; |
| 216 | 219 |
| 217 static bool g_interception_enabled; | 220 static bool g_interception_enabled; |
| 218 | 221 |
| 219 DISALLOW_COPY_AND_ASSIGN(URLFetcher); | 222 DISALLOW_COPY_AND_ASSIGN(URLFetcher); |
| 220 }; | 223 }; |
| 221 | 224 |
| 222 #endif // CHROME_COMMON_NET_URL_FETCHER_H_ | 225 #endif // CHROME_COMMON_NET_URL_FETCHER_H_ |
| OLD | NEW |