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 | |
179 // Set extra headers on the request. Must be called before the request | 174 // Set extra headers on the request. Must be called before the request |
180 // is started. | 175 // is started. |
181 // This replaces the entire extra request headers. | 176 // This replaces the entire extra request headers. |
182 virtual void SetExtraRequestHeaders( | 177 virtual void SetExtraRequestHeaders( |
183 const std::string& extra_request_headers) = 0; | 178 const std::string& extra_request_headers) = 0; |
184 | 179 |
185 // Add header (with format field-name ":" [ field-value ]) to the request | 180 // Add header (with format field-name ":" [ field-value ]) to the request |
186 // headers. Must be called before the request is started. | 181 // headers. Must be called before the request is started. |
187 // This appends the header to the current extra request headers. | 182 // This appends the header to the current extra request headers. |
188 virtual void AddExtraRequestHeader(const std::string& header_line) = 0; | 183 virtual void AddExtraRequestHeader(const std::string& header_line) = 0; |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
297 // be removed once the URLFetcher is destroyed. User should not take | 292 // be removed once the URLFetcher is destroyed. User should not take |
298 // ownership more than once, or call this method after taking ownership. | 293 // ownership more than once, or call this method after taking ownership. |
299 virtual bool GetResponseAsFilePath( | 294 virtual bool GetResponseAsFilePath( |
300 bool take_ownership, | 295 bool take_ownership, |
301 base::FilePath* out_response_path) const = 0; | 296 base::FilePath* out_response_path) const = 0; |
302 }; | 297 }; |
303 | 298 |
304 } // namespace net | 299 } // namespace net |
305 | 300 |
306 #endif // NET_URL_REQUEST_URL_FETCHER_H_ | 301 #endif // NET_URL_REQUEST_URL_FETCHER_H_ |
OLD | NEW |