| 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 |
| 11 #include "base/callback_forward.h" | 11 #include "base/callback_forward.h" |
| 12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
| 13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 14 #include "base/supports_user_data.h" | 14 #include "base/supports_user_data.h" |
| 15 #include "net/base/net_export.h" | 15 #include "net/base/net_export.h" |
| 16 #include "net/url_request/url_request.h" | 16 #include "net/url_request/url_request.h" |
| 17 | 17 |
| 18 class GURL; | 18 class GURL; |
| 19 | 19 |
| 20 namespace url { |
| 21 class Origin; |
| 22 }; |
| 23 |
| 20 namespace base { | 24 namespace base { |
| 21 class FilePath; | 25 class FilePath; |
| 22 class SequencedTaskRunner; | 26 class SequencedTaskRunner; |
| 23 class TaskRunner; | 27 class TaskRunner; |
| 24 class TimeDelta; | 28 class TimeDelta; |
| 25 } | 29 } |
| 26 | 30 |
| 27 namespace net { | 31 namespace net { |
| 28 class HostPortPair; | 32 class HostPortPair; |
| 29 class HttpRequestHeaders; | 33 class HttpRequestHeaders; |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 // Set the URLRequestContext on the request. Must be called before the | 207 // Set the URLRequestContext on the request. Must be called before the |
| 204 // request is started. | 208 // request is started. |
| 205 virtual void SetRequestContext( | 209 virtual void SetRequestContext( |
| 206 URLRequestContextGetter* request_context_getter) = 0; | 210 URLRequestContextGetter* request_context_getter) = 0; |
| 207 | 211 |
| 208 // Set the URL that should be consulted for the third-party cookie | 212 // Set the URL that should be consulted for the third-party cookie |
| 209 // blocking policy. | 213 // blocking policy. |
| 210 virtual void SetFirstPartyForCookies( | 214 virtual void SetFirstPartyForCookies( |
| 211 const GURL& first_party_for_cookies) = 0; | 215 const GURL& first_party_for_cookies) = 0; |
| 212 | 216 |
| 217 // Set the origin responsible for the request. |
| 218 virtual void SetRequestorOrigin(const url::Origin& requestor_origin) = 0; |
| 219 |
| 213 // Set the key and data callback that is used when setting the user | 220 // Set the key and data callback that is used when setting the user |
| 214 // data on any URLRequest objects this object creates. | 221 // data on any URLRequest objects this object creates. |
| 215 virtual void SetURLRequestUserData( | 222 virtual void SetURLRequestUserData( |
| 216 const void* key, | 223 const void* key, |
| 217 const CreateDataCallback& create_data_callback) = 0; | 224 const CreateDataCallback& create_data_callback) = 0; |
| 218 | 225 |
| 219 // If |stop_on_redirect| is true, 3xx responses will cause the fetch to halt | 226 // If |stop_on_redirect| is true, 3xx responses will cause the fetch to halt |
| 220 // immediately rather than continue through the redirect. OnURLFetchComplete | 227 // immediately rather than continue through the redirect. OnURLFetchComplete |
| 221 // will be called, with the URLFetcher's URL set to the redirect destination, | 228 // will be called, with the URLFetcher's URL set to the redirect destination, |
| 222 // its status set to CANCELED, and its response code set to the relevant 3xx | 229 // its status set to CANCELED, and its response code set to the relevant 3xx |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 // be removed once the URLFetcher is destroyed. User should not take | 321 // be removed once the URLFetcher is destroyed. User should not take |
| 315 // ownership more than once, or call this method after taking ownership. | 322 // ownership more than once, or call this method after taking ownership. |
| 316 virtual bool GetResponseAsFilePath( | 323 virtual bool GetResponseAsFilePath( |
| 317 bool take_ownership, | 324 bool take_ownership, |
| 318 base::FilePath* out_response_path) const = 0; | 325 base::FilePath* out_response_path) const = 0; |
| 319 }; | 326 }; |
| 320 | 327 |
| 321 } // namespace net | 328 } // namespace net |
| 322 | 329 |
| 323 #endif // NET_URL_REQUEST_URL_FETCHER_H_ | 330 #endif // NET_URL_REQUEST_URL_FETCHER_H_ |
| OLD | NEW |