Chromium Code Reviews| Index: net/url_request/url_request.h |
| diff --git a/net/url_request/url_request.h b/net/url_request/url_request.h |
| index f685cf76e7bb23fe2c0f93b28c687cd61cacc71a..6eb7961d25161bd280d93164e6f79451c1c9bf99 100644 |
| --- a/net/url_request/url_request.h |
| +++ b/net/url_request/url_request.h |
| @@ -42,6 +42,10 @@ class StackTrace; |
| } // namespace debug |
| } // namespace base |
| +namespace url { |
| +class Origin; |
| +} |
| + |
| namespace net { |
| class ChunkedUploadDataStream; |
| @@ -282,12 +286,20 @@ class NET_EXPORT URLRequest : NON_EXPORTED_BASE(public base::NonThreadSafe), |
| } |
| void set_first_party_url_policy(FirstPartyURLPolicy first_party_url_policy); |
| + // The origin of the context which initiated the request. |
| + const url::Origin initiator() const { return initiator_; } |
|
mmenke
2015/10/21 15:36:38
const url::Origin&
mmenke
2015/10/21 15:36:38
I'm concerned that I have no idea what the differe
Mike West
2015/10/22 13:17:02
Done and done.
|
| + // This method may only be called before Start(). |
| + void set_initiator(const url::Origin& initiator); |
| + |
| // 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. |
| const std::string& method() const { return method_; } |
| void set_method(const std::string& method); |
| + // True if the request method is "safe" (per section 4.2.1 of RFC 7231). |
| + bool is_safe_method() const; |
| + |
| // The referrer URL for the request. This header may actually be suppressed |
| // from the underlying network request for security reasons (e.g., a HTTPS |
| // URL will not be sent as the referrer for a HTTP request). The referrer |
| @@ -759,6 +771,7 @@ class NET_EXPORT URLRequest : NON_EXPORTED_BASE(public base::NonThreadSafe), |
| std::vector<GURL> url_chain_; |
| GURL first_party_for_cookies_; |
| + url::Origin initiator_; |
| GURL delegate_redirect_url_; |
| std::string method_; // "GET", "POST", etc. Should be all uppercase. |
| std::string referrer_; |