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

Unified Diff: net/url_request/url_fetcher_core.h

Issue 1411813003: Teach URLRequest about initiator checks for First-Party-Only cookies. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Feedback. Created 4 years, 11 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_fetcher_core.h
diff --git a/net/url_request/url_fetcher_core.h b/net/url_request/url_fetcher_core.h
index ad40799a8370843a9f143f6931af334082ae867f..9b4bba2c53b7fc1d5ce6c01bd92dbefd50286172 100644
--- a/net/url_request/url_fetcher_core.h
+++ b/net/url_request/url_fetcher_core.h
@@ -87,9 +87,12 @@ class URLFetcherCore : public base::RefCountedThreadSafe<URLFetcherCore>,
void SetExtraRequestHeaders(const std::string& extra_request_headers);
void AddExtraRequestHeader(const std::string& header_line);
void SetRequestContext(URLRequestContextGetter* request_context_getter);
- // Set the URL that should be consulted for the third-party cookie
- // blocking policy.
- void SetFirstPartyForCookies(const GURL& first_party_for_cookies);
+ // Set the URL that should be considered as "initiating" the fetch. This URL
+ // will be considered the "first-party" when applying cookie blocking policy
+ // to requests, and treated as the request's initiator.
+ //
+ // TODO(mkwst): Convert this to a url::Origin. https://crbug.com/577565
+ void SetInitiatorURL(const GURL& initiator);
// Set the key and data callback that is used when setting the user
// data on any URLRequest objects this object creates.
void SetURLRequestUserData(
@@ -243,7 +246,7 @@ class URLFetcherCore : public base::RefCountedThreadSafe<URLFetcherCore>,
// Read buffer
scoped_refptr<URLRequestContextGetter> request_context_getter_;
// Cookie/cache info for the request
- GURL first_party_for_cookies_; // The first party URL for the request
+ GURL initiator_; // The request's initiator
// The user data to add to each newly-created URLRequest.
const void* url_request_data_key_;
URLFetcher::CreateDataCallback url_request_create_data_callback_;

Powered by Google App Engine
This is Rietveld 408576698