Chromium Code Reviews| 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 <string> | 10 #include <string> |
| (...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 319 // may only be changed before Start() is called. | 319 // may only be changed before Start() is called. |
| 320 const std::string& referrer() const { return referrer_; } | 320 const std::string& referrer() const { return referrer_; } |
| 321 // Referrer is sanitized to remove URL fragment, user name and password. | 321 // Referrer is sanitized to remove URL fragment, user name and password. |
| 322 void SetReferrer(const std::string& referrer); | 322 void SetReferrer(const std::string& referrer); |
| 323 | 323 |
| 324 // The referrer policy to apply when updating the referrer during redirects. | 324 // The referrer policy to apply when updating the referrer during redirects. |
| 325 // The referrer policy may only be changed before Start() is called. | 325 // The referrer policy may only be changed before Start() is called. |
| 326 ReferrerPolicy referrer_policy() const { return referrer_policy_; } | 326 ReferrerPolicy referrer_policy() const { return referrer_policy_; } |
| 327 void set_referrer_policy(ReferrerPolicy referrer_policy); | 327 void set_referrer_policy(ReferrerPolicy referrer_policy); |
| 328 | 328 |
| 329 // If this request should include a referred Token Binding, this returns the | |
| 330 // hostname of the referrer that indicated this request should include a | |
| 331 // referred Token Binding. Otherwise, this returns the empty string. | |
| 332 const std::string& token_binding_referrer() const { | |
|
davidben
2016/03/15 22:49:56
Is this actually needed? URLRequestJob is a friend
nharper
2016/03/16 17:49:22
URLRequestHttpJob is accessing it and isn't a frie
davidben
2016/03/24 20:53:51
Oh, C++ works that way? Ugh. Okay then. :-)
| |
| 333 return token_binding_referrer_; | |
| 334 } | |
| 335 | |
| 329 // Sets the delegate of the request. This is only to allow creating a request | 336 // Sets the delegate of the request. This is only to allow creating a request |
| 330 // before creating its delegate. |delegate| must be non-NULL and the request | 337 // before creating its delegate. |delegate| must be non-NULL and the request |
| 331 // must not yet have a Delegate set. | 338 // must not yet have a Delegate set. |
| 332 void set_delegate(Delegate* delegate); | 339 void set_delegate(Delegate* delegate); |
| 333 | 340 |
| 334 // Indicates that the request body should be sent using chunked transfer | 341 // Indicates that the request body should be sent using chunked transfer |
| 335 // encoding. This method may only be called before Start() is called. | 342 // encoding. This method may only be called before Start() is called. |
| 336 void EnableChunkedUpload(); | 343 void EnableChunkedUpload(); |
| 337 | 344 |
| 338 // Appends the given bytes to the request's upload data to be sent | 345 // Appends the given bytes to the request's upload data to be sent |
| (...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 787 // URLRequest. | 794 // URLRequest. |
| 788 ChunkedUploadDataStream* upload_chunked_data_stream_; | 795 ChunkedUploadDataStream* upload_chunked_data_stream_; |
| 789 | 796 |
| 790 std::vector<GURL> url_chain_; | 797 std::vector<GURL> url_chain_; |
| 791 GURL first_party_for_cookies_; | 798 GURL first_party_for_cookies_; |
| 792 url::Origin initiator_; | 799 url::Origin initiator_; |
| 793 GURL delegate_redirect_url_; | 800 GURL delegate_redirect_url_; |
| 794 std::string method_; // "GET", "POST", etc. Should be all uppercase. | 801 std::string method_; // "GET", "POST", etc. Should be all uppercase. |
| 795 std::string referrer_; | 802 std::string referrer_; |
| 796 ReferrerPolicy referrer_policy_; | 803 ReferrerPolicy referrer_policy_; |
| 804 std::string token_binding_referrer_; | |
| 797 FirstPartyURLPolicy first_party_url_policy_; | 805 FirstPartyURLPolicy first_party_url_policy_; |
| 798 HttpRequestHeaders extra_request_headers_; | 806 HttpRequestHeaders extra_request_headers_; |
| 799 int load_flags_; // Flags indicating the request type for the load; | 807 int load_flags_; // Flags indicating the request type for the load; |
| 800 // expected values are LOAD_* enums above. | 808 // expected values are LOAD_* enums above. |
| 801 | 809 |
| 802 // Never access methods of the |delegate_| directly. Always use the | 810 // Never access methods of the |delegate_| directly. Always use the |
| 803 // Notify... methods for this. | 811 // Notify... methods for this. |
| 804 Delegate* delegate_; | 812 Delegate* delegate_; |
| 805 | 813 |
| 806 // Current error status of the job. When no error has been encountered, this | 814 // Current error status of the job. When no error has been encountered, this |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 885 HostPortPair proxy_server_; | 893 HostPortPair proxy_server_; |
| 886 | 894 |
| 887 scoped_ptr<const base::debug::StackTrace> stack_trace_; | 895 scoped_ptr<const base::debug::StackTrace> stack_trace_; |
| 888 | 896 |
| 889 DISALLOW_COPY_AND_ASSIGN(URLRequest); | 897 DISALLOW_COPY_AND_ASSIGN(URLRequest); |
| 890 }; | 898 }; |
| 891 | 899 |
| 892 } // namespace net | 900 } // namespace net |
| 893 | 901 |
| 894 #endif // NET_URL_REQUEST_URL_REQUEST_H_ | 902 #endif // NET_URL_REQUEST_URL_REQUEST_H_ |
| OLD | NEW |