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 #ifndef NET_URL_REQUEST_URL_FETCHER_H_ | 5 #ifndef NET_URL_REQUEST_URL_FETCHER_H_ |
6 #define NET_URL_REQUEST_URL_FETCHER_H_ | 6 #define NET_URL_REQUEST_URL_FETCHER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 // called before the request is started. | 164 // called before the request is started. |
165 virtual void SetLoadFlags(int load_flags) = 0; | 165 virtual void SetLoadFlags(int load_flags) = 0; |
166 | 166 |
167 // Returns the current load flags. | 167 // Returns the current load flags. |
168 virtual int GetLoadFlags() const = 0; | 168 virtual int GetLoadFlags() const = 0; |
169 | 169 |
170 // The referrer URL for the request. Must be called before the request is | 170 // The referrer URL for the request. Must be called before the request is |
171 // started. | 171 // started. |
172 virtual void SetReferrer(const std::string& referrer) = 0; | 172 virtual void SetReferrer(const std::string& referrer) = 0; |
173 | 173 |
| 174 // The referrer policy to apply when updating the referrer during redirects. |
| 175 // The referrer policy may only be changed before Start() is called. |
| 176 virtual void SetReferrerPolicy( |
| 177 URLRequest::ReferrerPolicy referrer_policy) = 0; |
| 178 |
174 // Set extra headers on the request. Must be called before the request | 179 // Set extra headers on the request. Must be called before the request |
175 // is started. | 180 // is started. |
176 // This replaces the entire extra request headers. | 181 // This replaces the entire extra request headers. |
177 virtual void SetExtraRequestHeaders( | 182 virtual void SetExtraRequestHeaders( |
178 const std::string& extra_request_headers) = 0; | 183 const std::string& extra_request_headers) = 0; |
179 | 184 |
180 // Add header (with format field-name ":" [ field-value ]) to the request | 185 // Add header (with format field-name ":" [ field-value ]) to the request |
181 // headers. Must be called before the request is started. | 186 // headers. Must be called before the request is started. |
182 // This appends the header to the current extra request headers. | 187 // This appends the header to the current extra request headers. |
183 virtual void AddExtraRequestHeader(const std::string& header_line) = 0; | 188 virtual void AddExtraRequestHeader(const std::string& header_line) = 0; |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 // be removed once the URLFetcher is destroyed. User should not take | 297 // be removed once the URLFetcher is destroyed. User should not take |
293 // ownership more than once, or call this method after taking ownership. | 298 // ownership more than once, or call this method after taking ownership. |
294 virtual bool GetResponseAsFilePath( | 299 virtual bool GetResponseAsFilePath( |
295 bool take_ownership, | 300 bool take_ownership, |
296 base::FilePath* out_response_path) const = 0; | 301 base::FilePath* out_response_path) const = 0; |
297 }; | 302 }; |
298 | 303 |
299 } // namespace net | 304 } // namespace net |
300 | 305 |
301 #endif // NET_URL_REQUEST_URL_FETCHER_H_ | 306 #endif // NET_URL_REQUEST_URL_FETCHER_H_ |
OLD | NEW |