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

Unified Diff: content/browser/storage_partition_impl_map.cc

Issue 2116503004: Make Foreign Fetch an origin trial. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: minor fixes Created 4 years, 4 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: content/browser/storage_partition_impl_map.cc
diff --git a/content/browser/storage_partition_impl_map.cc b/content/browser/storage_partition_impl_map.cc
index 5100cbd721447235d13c73fd719dbfc5e5f47026..a9037e1bd63c3f048f8ae35bf4f1507bd4d4161d 100644
--- a/content/browser/storage_partition_impl_map.cc
+++ b/content/browser/storage_partition_impl_map.cc
@@ -42,6 +42,7 @@
#include "content/public/browser/storage_partition.h"
#include "content/public/common/content_constants.h"
#include "content/public/common/content_switches.h"
+#include "content/public/common/origin_trial_policy.h"
#include "content/public/common/url_constants.h"
#include "crypto/sha2.h"
#include "net/url_request/url_request_context.h"
@@ -445,8 +446,12 @@ StoragePartitionImpl* StoragePartitionImplMap::Get(
request_interceptors.push_back(
ServiceWorkerRequestHandler::CreateInterceptor(
browser_context_->GetResourceContext()).release());
+ OriginTrialPolicy* origin_trial_policy =
+ GetContentClient()->GetOriginTrialPolicy();
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableExperimentalWebPlatformFeatures)) {
+ switches::kEnableExperimentalWebPlatformFeatures) ||
+ !origin_trial_policy ||
pfeldman 2016/08/12 18:49:23 ditto
+ !origin_trial_policy->IsFeatureDisabled("ForeignFetch")) {
request_interceptors.push_back(
ForeignFetchRequestHandler::CreateInterceptor(
browser_context_->GetResourceContext())

Powered by Google App Engine
This is Rietveld 408576698