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_; |