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

Unified 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, 5 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request.h
diff --git a/net/url_request/url_request.h b/net/url_request/url_request.h
index 4176689a30c1a0ed4b100e8e1d8667366ede5f8f..a28b751afaad0a38c64d1ac47cdf3da63d946f9e 100644
--- a/net/url_request/url_request.h
+++ b/net/url_request/url_request.h
@@ -31,6 +31,7 @@
#include "net/socket/connection_attempts.h"
#include "net/url_request/url_request_status.h"
#include "url/gurl.h"
+#include "url/origin.h"
namespace base {
class Value;
@@ -275,6 +276,11 @@ class NET_EXPORT URLRequest : NON_EXPORTED_BASE(public base::NonThreadSafe),
}
void set_first_party_url_policy(FirstPartyURLPolicy first_party_url_policy);
+ // The origin responsible for the request.
+ const url::Origin& requestor_origin() const { return requestor_origin_; }
+ // This method may only be called before Start().
+ void set_requestor_origin(const url::Origin& requestor_origin);
+
// The request method, as an uppercase string. "GET" is the default value.
// The request method may only be changed before Start() is called and
// should only be assigned an uppercase value.
@@ -728,6 +734,7 @@ class NET_EXPORT URLRequest : NON_EXPORTED_BASE(public base::NonThreadSafe),
std::vector<GURL> url_chain_;
GURL first_party_for_cookies_;
+ url::Origin requestor_origin_;
GURL delegate_redirect_url_;
std::string method_; // "GET", "POST", etc. Should be all uppercase.
std::string referrer_;
« 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