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 <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 // Add header (with format field-name ":" [ field-value ]) to the request | 200 // Add header (with format field-name ":" [ field-value ]) to the request |
201 // headers. Must be called before the request is started. | 201 // headers. Must be called before the request is started. |
202 // This appends the header to the current extra request headers. | 202 // This appends the header to the current extra request headers. |
203 virtual void AddExtraRequestHeader(const std::string& header_line) = 0; | 203 virtual void AddExtraRequestHeader(const std::string& header_line) = 0; |
204 | 204 |
205 // Set the URLRequestContext on the request. Must be called before the | 205 // Set the URLRequestContext on the request. Must be called before the |
206 // request is started. | 206 // request is started. |
207 virtual void SetRequestContext( | 207 virtual void SetRequestContext( |
208 URLRequestContextGetter* request_context_getter) = 0; | 208 URLRequestContextGetter* request_context_getter) = 0; |
209 | 209 |
210 // Set the URL that should be consulted for the third-party cookie | 210 // Set the URL that should be considered as "initiating" the fetch. This URL |
211 // blocking policy. | 211 // will be considered the "first-party" when applying cookie blocking policy |
212 virtual void SetFirstPartyForCookies( | 212 // to requests, and treated as the request's initiator. |
213 const GURL& first_party_for_cookies) = 0; | 213 // |
| 214 // TODO(mkwst): Convert this to take a 'url::Origin': https://crbug.com/577565 |
| 215 virtual void SetInitiatorURL(const GURL& initiator) = 0; |
214 | 216 |
215 // Set the key and data callback that is used when setting the user | 217 // Set the key and data callback that is used when setting the user |
216 // data on any URLRequest objects this object creates. | 218 // data on any URLRequest objects this object creates. |
217 virtual void SetURLRequestUserData( | 219 virtual void SetURLRequestUserData( |
218 const void* key, | 220 const void* key, |
219 const CreateDataCallback& create_data_callback) = 0; | 221 const CreateDataCallback& create_data_callback) = 0; |
220 | 222 |
221 // If |stop_on_redirect| is true, 3xx responses will cause the fetch to halt | 223 // If |stop_on_redirect| is true, 3xx responses will cause the fetch to halt |
222 // immediately rather than continue through the redirect. OnURLFetchComplete | 224 // immediately rather than continue through the redirect. OnURLFetchComplete |
223 // will be called, with the URLFetcher's URL set to the redirect destination, | 225 // will be called, with the URLFetcher's URL set to the redirect destination, |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
329 // be removed once the URLFetcher is destroyed. User should not take | 331 // be removed once the URLFetcher is destroyed. User should not take |
330 // ownership more than once, or call this method after taking ownership. | 332 // ownership more than once, or call this method after taking ownership. |
331 virtual bool GetResponseAsFilePath( | 333 virtual bool GetResponseAsFilePath( |
332 bool take_ownership, | 334 bool take_ownership, |
333 base::FilePath* out_response_path) const = 0; | 335 base::FilePath* out_response_path) const = 0; |
334 }; | 336 }; |
335 | 337 |
336 } // namespace net | 338 } // namespace net |
337 | 339 |
338 #endif // NET_URL_REQUEST_URL_FETCHER_H_ | 340 #endif // NET_URL_REQUEST_URL_FETCHER_H_ |
OLD | NEW |