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

Unified Diff: chrome/browser/net/chrome_network_delegate.cc

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: 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: chrome/browser/net/chrome_network_delegate.cc
diff --git a/chrome/browser/net/chrome_network_delegate.cc b/chrome/browser/net/chrome_network_delegate.cc
index 39e3626fbfdaa6c5f547c3a03846acb06af9693b..45ded26c648684defe1b77542a4ff949eb1c910b 100644
--- a/chrome/browser/net/chrome_network_delegate.cc
+++ b/chrome/browser/net/chrome_network_delegate.cc
@@ -9,6 +9,7 @@
#include <vector>
#include "base/base_paths.h"
+#include "base/command_line.h"
#include "base/debug/alias.h"
#include "base/debug/dump_without_crashing.h"
#include "base/debug/stack_trace.h"
@@ -41,6 +42,7 @@
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/resource_request_info.h"
+#include "content/public/common/content_switches.h"
#include "content/public/common/process_type.h"
#include "net/base/host_port_pair.h"
#include "net/base/load_flags.h"
@@ -61,7 +63,6 @@
#endif
#if defined(OS_CHROMEOS)
-#include "base/command_line.h"
#include "base/sys_info.h"
#include "chrome/common/chrome_switches.h"
#endif
@@ -295,6 +296,7 @@ ChromeNetworkDelegate::ChromeNetworkDelegate(
url_blacklist_manager_(NULL),
#endif
domain_reliability_monitor_(NULL),
+ experimental_web_platform_features_enabled_(false),
mmenke 2015/02/20 16:30:39 Can we just read the command line flag on construc
Mike West 2015/02/23 15:51:17 Makes a lot of sense to me. Moved.
first_request_(true),
prerender_tracker_(NULL) {
DCHECK(enable_referrers);
@@ -330,6 +332,10 @@ void ChromeNetworkDelegate::SetEnableClientHints() {
client_hints_->Init();
}
+void ChromeNetworkDelegate::SetExperimentalWebPlatformFeaturesEnabled() {
mmenke 2015/02/20 16:30:39 If you choose to keep this (See earlier comment),
Mike West 2015/02/23 15:51:17 Done, thanks!
+ experimental_web_platform_features_enabled_ = true;
+}
+
// static
#if defined(ENABLE_EXTENSIONS)
void ChromeNetworkDelegate::NeverThrottleRequests() {
@@ -742,6 +748,10 @@ bool ChromeNetworkDelegate::OnCanEnablePrivacyMode(
return privacy_mode;
}
+bool ChromeNetworkDelegate::OnFirstPartyCookieExperimentEnabled() const {
+ return experimental_web_platform_features_enabled_;
+}
+
bool ChromeNetworkDelegate::OnCancelURLRequestWithPolicyViolatingReferrerHeader(
const net::URLRequest& request,
const GURL& target_url,

Powered by Google App Engine
This is Rietveld 408576698