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

Unified Diff: net/url_request/url_request.h

Issue 2405483002: Make the request initiator Optional (Closed)
Patch Set: Introduce NullableOrigin to use for request initiator Created 4 years, 2 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
Index: net/url_request/url_request.h
diff --git a/net/url_request/url_request.h b/net/url_request/url_request.h
index 993afc97876f17179c82f0c80227be21347f11b8..e6c7d83889982fc49d9310fcb6ebe2fecdfaad3d 100644
--- a/net/url_request/url_request.h
+++ b/net/url_request/url_request.h
@@ -299,9 +299,9 @@ class NET_EXPORT URLRequest : NON_EXPORTED_BASE(public base::NonThreadSafe),
//
// This value is used to perform the cross-origin check specified in Section
// 4.3 of https://tools.ietf.org/html/draft-west-first-party-cookies.
- const url::Origin& initiator() const { return initiator_; }
+ url::NullableOrigin* initiator() const { return initiator_.get(); }
// This method may only be called before Start().
- void set_initiator(const url::Origin& initiator);
+ void set_initiator(scoped_refptr<url::NullableOrigin> 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
@@ -757,7 +757,7 @@ class NET_EXPORT URLRequest : NON_EXPORTED_BASE(public base::NonThreadSafe),
std::vector<GURL> url_chain_;
GURL first_party_for_cookies_;
- url::Origin initiator_;
+ scoped_refptr<url::NullableOrigin> initiator_;
GURL delegate_redirect_url_;
std::string method_; // "GET", "POST", etc. Should be all uppercase.
std::string referrer_;

Powered by Google App Engine
This is Rietveld 408576698