Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1115)

Side by Side Diff: net/url_request/url_request.h

Issue 1253353004: WIP: Teach "First-Party-Only" cookies about the requestor origin. Base URL: https://chromium.googlesource.com/chromium/src.git@cookie-options
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/url_request/url_fetcher_impl.cc ('k') | net/url_request/url_request.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 13 matching lines...) Expand all
24 #include "net/base/network_delegate.h" 24 #include "net/base/network_delegate.h"
25 #include "net/base/request_priority.h" 25 #include "net/base/request_priority.h"
26 #include "net/base/upload_progress.h" 26 #include "net/base/upload_progress.h"
27 #include "net/cookies/canonical_cookie.h" 27 #include "net/cookies/canonical_cookie.h"
28 #include "net/http/http_request_headers.h" 28 #include "net/http/http_request_headers.h"
29 #include "net/http/http_response_info.h" 29 #include "net/http/http_response_info.h"
30 #include "net/log/net_log.h" 30 #include "net/log/net_log.h"
31 #include "net/socket/connection_attempts.h" 31 #include "net/socket/connection_attempts.h"
32 #include "net/url_request/url_request_status.h" 32 #include "net/url_request/url_request_status.h"
33 #include "url/gurl.h" 33 #include "url/gurl.h"
34 #include "url/origin.h"
34 35
35 namespace base { 36 namespace base {
36 class Value; 37 class Value;
37 38
38 namespace debug { 39 namespace debug {
39 class StackTrace; 40 class StackTrace;
40 } // namespace debug 41 } // namespace debug
41 } // namespace base 42 } // namespace base
42 43
43 namespace net { 44 namespace net {
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 void set_first_party_for_cookies(const GURL& first_party_for_cookies); 269 void set_first_party_for_cookies(const GURL& first_party_for_cookies);
269 270
270 // The first-party URL policy to apply when updating the first party URL 271 // The first-party URL policy to apply when updating the first party URL
271 // during redirects. The first-party URL policy may only be changed before 272 // during redirects. The first-party URL policy may only be changed before
272 // Start() is called. 273 // Start() is called.
273 FirstPartyURLPolicy first_party_url_policy() const { 274 FirstPartyURLPolicy first_party_url_policy() const {
274 return first_party_url_policy_; 275 return first_party_url_policy_;
275 } 276 }
276 void set_first_party_url_policy(FirstPartyURLPolicy first_party_url_policy); 277 void set_first_party_url_policy(FirstPartyURLPolicy first_party_url_policy);
277 278
279 // The origin responsible for the request.
280 const url::Origin& requestor_origin() const { return requestor_origin_; }
281 // This method may only be called before Start().
282 void set_requestor_origin(const url::Origin& requestor_origin);
283
278 // The request method, as an uppercase string. "GET" is the default value. 284 // The request method, as an uppercase string. "GET" is the default value.
279 // The request method may only be changed before Start() is called and 285 // The request method may only be changed before Start() is called and
280 // should only be assigned an uppercase value. 286 // should only be assigned an uppercase value.
281 const std::string& method() const { return method_; } 287 const std::string& method() const { return method_; }
282 void set_method(const std::string& method); 288 void set_method(const std::string& method);
283 289
284 // The referrer URL for the request. This header may actually be suppressed 290 // The referrer URL for the request. This header may actually be suppressed
285 // from the underlying network request for security reasons (e.g., a HTTPS 291 // from the underlying network request for security reasons (e.g., a HTTPS
286 // URL will not be sent as the referrer for a HTTP request). The referrer 292 // URL will not be sent as the referrer for a HTTP request). The referrer
287 // may only be changed before Start() is called. 293 // may only be changed before Start() is called.
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
721 BoundNetLog net_log_; 727 BoundNetLog net_log_;
722 728
723 scoped_refptr<URLRequestJob> job_; 729 scoped_refptr<URLRequestJob> job_;
724 scoped_ptr<UploadDataStream> upload_data_stream_; 730 scoped_ptr<UploadDataStream> upload_data_stream_;
725 // TODO(mmenke): Make whether or not an upload is chunked transparent to the 731 // TODO(mmenke): Make whether or not an upload is chunked transparent to the
726 // URLRequest. 732 // URLRequest.
727 ChunkedUploadDataStream* upload_chunked_data_stream_; 733 ChunkedUploadDataStream* upload_chunked_data_stream_;
728 734
729 std::vector<GURL> url_chain_; 735 std::vector<GURL> url_chain_;
730 GURL first_party_for_cookies_; 736 GURL first_party_for_cookies_;
737 url::Origin requestor_origin_;
731 GURL delegate_redirect_url_; 738 GURL delegate_redirect_url_;
732 std::string method_; // "GET", "POST", etc. Should be all uppercase. 739 std::string method_; // "GET", "POST", etc. Should be all uppercase.
733 std::string referrer_; 740 std::string referrer_;
734 ReferrerPolicy referrer_policy_; 741 ReferrerPolicy referrer_policy_;
735 FirstPartyURLPolicy first_party_url_policy_; 742 FirstPartyURLPolicy first_party_url_policy_;
736 HttpRequestHeaders extra_request_headers_; 743 HttpRequestHeaders extra_request_headers_;
737 int load_flags_; // Flags indicating the request type for the load; 744 int load_flags_; // Flags indicating the request type for the load;
738 // expected values are LOAD_* enums above. 745 // expected values are LOAD_* enums above.
739 746
740 // Never access methods of the |delegate_| directly. Always use the 747 // Never access methods of the |delegate_| directly. Always use the
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
823 HostPortPair proxy_server_; 830 HostPortPair proxy_server_;
824 831
825 scoped_ptr<const base::debug::StackTrace> stack_trace_; 832 scoped_ptr<const base::debug::StackTrace> stack_trace_;
826 833
827 DISALLOW_COPY_AND_ASSIGN(URLRequest); 834 DISALLOW_COPY_AND_ASSIGN(URLRequest);
828 }; 835 };
829 836
830 } // namespace net 837 } // namespace net
831 838
832 #endif // NET_URL_REQUEST_URL_REQUEST_H_ 839 #endif // NET_URL_REQUEST_URL_REQUEST_H_
OLDNEW
« no previous file with comments | « net/url_request/url_fetcher_impl.cc ('k') | net/url_request/url_request.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698