| 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_REQUEST_H_ | 5 #ifndef NET_URL_REQUEST_URL_REQUEST_H_ |
| 6 #define NET_URL_REQUEST_URL_REQUEST_H_ | 6 #define NET_URL_REQUEST_URL_REQUEST_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 // each of those requests will be `https://example.com/`. | 292 // each of those requests will be `https://example.com/`. |
| 293 // | 293 // |
| 294 // 2. The request's initiator is the origin of the frame or worker which made | 294 // 2. The request's initiator is the origin of the frame or worker which made |
| 295 // the request, even for top-level navigations. That is, if | 295 // the request, even for top-level navigations. That is, if |
| 296 // `https://example.com/`'s form submission is made in the top-level frame, | 296 // `https://example.com/`'s form submission is made in the top-level frame, |
| 297 // the first party for cookies would be the target URL's origin. The | 297 // the first party for cookies would be the target URL's origin. The |
| 298 // initiator remains `https://example.com/`. | 298 // initiator remains `https://example.com/`. |
| 299 // | 299 // |
| 300 // This value is used to perform the cross-origin check specified in Section | 300 // This value is used to perform the cross-origin check specified in Section |
| 301 // 4.3 of https://tools.ietf.org/html/draft-west-first-party-cookies. | 301 // 4.3 of https://tools.ietf.org/html/draft-west-first-party-cookies. |
| 302 const url::Origin& initiator() const { return initiator_; } | 302 url::NullableOrigin* initiator() const { return initiator_.get(); } |
| 303 // This method may only be called before Start(). | 303 // This method may only be called before Start(). |
| 304 void set_initiator(const url::Origin& initiator); | 304 void set_initiator(scoped_refptr<url::NullableOrigin> initiator); |
| 305 | 305 |
| 306 // The request method, as an uppercase string. "GET" is the default value. | 306 // The request method, as an uppercase string. "GET" is the default value. |
| 307 // The request method may only be changed before Start() is called and | 307 // The request method may only be changed before Start() is called and |
| 308 // should only be assigned an uppercase value. | 308 // should only be assigned an uppercase value. |
| 309 const std::string& method() const { return method_; } | 309 const std::string& method() const { return method_; } |
| 310 void set_method(const std::string& method); | 310 void set_method(const std::string& method); |
| 311 | 311 |
| 312 // The referrer URL for the request. This header may actually be suppressed | 312 // The referrer URL for the request. This header may actually be suppressed |
| 313 // from the underlying network request for security reasons (e.g., a HTTPS | 313 // from the underlying network request for security reasons (e.g., a HTTPS |
| 314 // URL will not be sent as the referrer for a HTTP request). The referrer | 314 // URL will not be sent as the referrer for a HTTP request). The referrer |
| (...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 750 NetworkDelegate* network_delegate_; | 750 NetworkDelegate* network_delegate_; |
| 751 | 751 |
| 752 // Tracks the time spent in various load states throughout this request. | 752 // Tracks the time spent in various load states throughout this request. |
| 753 NetLogWithSource net_log_; | 753 NetLogWithSource net_log_; |
| 754 | 754 |
| 755 std::unique_ptr<URLRequestJob> job_; | 755 std::unique_ptr<URLRequestJob> job_; |
| 756 std::unique_ptr<UploadDataStream> upload_data_stream_; | 756 std::unique_ptr<UploadDataStream> upload_data_stream_; |
| 757 | 757 |
| 758 std::vector<GURL> url_chain_; | 758 std::vector<GURL> url_chain_; |
| 759 GURL first_party_for_cookies_; | 759 GURL first_party_for_cookies_; |
| 760 url::Origin initiator_; | 760 scoped_refptr<url::NullableOrigin> initiator_; |
| 761 GURL delegate_redirect_url_; | 761 GURL delegate_redirect_url_; |
| 762 std::string method_; // "GET", "POST", etc. Should be all uppercase. | 762 std::string method_; // "GET", "POST", etc. Should be all uppercase. |
| 763 std::string referrer_; | 763 std::string referrer_; |
| 764 ReferrerPolicy referrer_policy_; | 764 ReferrerPolicy referrer_policy_; |
| 765 std::string token_binding_referrer_; | 765 std::string token_binding_referrer_; |
| 766 FirstPartyURLPolicy first_party_url_policy_; | 766 FirstPartyURLPolicy first_party_url_policy_; |
| 767 HttpRequestHeaders extra_request_headers_; | 767 HttpRequestHeaders extra_request_headers_; |
| 768 int load_flags_; // Flags indicating the request type for the load; | 768 int load_flags_; // Flags indicating the request type for the load; |
| 769 // expected values are LOAD_* enums above. | 769 // expected values are LOAD_* enums above. |
| 770 | 770 |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 852 | 852 |
| 853 // The raw header size of the response. | 853 // The raw header size of the response. |
| 854 int raw_header_size_; | 854 int raw_header_size_; |
| 855 | 855 |
| 856 DISALLOW_COPY_AND_ASSIGN(URLRequest); | 856 DISALLOW_COPY_AND_ASSIGN(URLRequest); |
| 857 }; | 857 }; |
| 858 | 858 |
| 859 } // namespace net | 859 } // namespace net |
| 860 | 860 |
| 861 #endif // NET_URL_REQUEST_URL_REQUEST_H_ | 861 #endif // NET_URL_REQUEST_URL_REQUEST_H_ |
| OLD | NEW |