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

Unified Diff: net/base/network_delegate.h

Issue 940373002: First-Party Cookies: Wire it up as an experimental web platform feature (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@first-party
Patch Set: Feedback. Created 5 years, 10 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/base/network_delegate.h
diff --git a/net/base/network_delegate.h b/net/base/network_delegate.h
index 5af2ac140efa5b6f5e0d4fe897d413f7fb31bdde..9ea82028b11fc8dd6025577c9b84406f81d0d141 100644
--- a/net/base/network_delegate.h
+++ b/net/base/network_delegate.h
@@ -104,6 +104,10 @@ class NET_EXPORT NetworkDelegate : public base::NonThreadSafe {
bool CanEnablePrivacyMode(const GURL& url,
const GURL& first_party_for_cookies) const;
+ // TODO(mkwst): Remove this once we decide whether or not we wish to ship
+ // first-party cookies. https://crbug.com/459154
+ bool FirstPartyOnlyCookieExperimentEnabled() const;
+
bool CancelURLRequestWithPolicyViolatingReferrerHeader(
const URLRequest& request,
const GURL& target_url,
@@ -266,6 +270,13 @@ class NET_EXPORT NetworkDelegate : public base::NonThreadSafe {
const GURL& url,
const GURL& first_party_for_cookies) const = 0;
+ // Returns true if the embedder has enabled the "first-party" cookie
+ // experiment, and false otherwise.
+ //
+ // TODO(mkwst): Remove this once we decide whether or not we wish to ship
+ // first-party cookies. https://crbug.com/459154
+ virtual bool OnFirstPartyOnlyCookieExperimentEnabled() const = 0;
+
// Called when the |referrer_url| for requesting |target_url| during handling
// of the |request| is does not comply with the referrer policy (e.g. a
// secure referrer for an insecure initial target).

Powered by Google App Engine
This is Rietveld 408576698