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

Unified Diff: chrome/common/chrome_content_client.cc

Issue 1741783002: Add disabled origin trial feature list (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ef-finch
Patch Set: Separate the introduction of preference-persistence into a different CL Created 4 years, 6 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/common/chrome_content_client.cc
diff --git a/chrome/common/chrome_content_client.cc b/chrome/common/chrome_content_client.cc
index c2aec354e700f1c6546226895d9585b1523ee656..38e9fb8e29d3d4ea2b96edf212c1871df71ad759 100644
--- a/chrome/common/chrome_content_client.cc
+++ b/chrome/common/chrome_content_client.cc
@@ -702,14 +702,24 @@ base::StringPiece ChromeContentClient::GetOriginTrialPublicKey() {
return origin_trial_key_manager_.GetPublicKey();
}
+bool ChromeContentClient::IsOriginTrialFeatureDisabled(
+ base::StringPiece feature) {
+ return origin_trial_key_manager_.IsFeatureDisabled(feature);
+}
+
void ChromeContentClient::InitializeOriginTrialPolicy() {
- // Set the public key for the origin trial key manager, based on the command
- // line flags which were passed to this process.
+ // Set the public key and disabled feature list for the origin trial key
+ // manager, based on the command line flags which were passed to this process.
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
if (command_line->HasSwitch(switches::kOriginTrialPublicKey)) {
origin_trial_key_manager()->SetPublicKeyFromASCIIString(
command_line->GetSwitchValueASCII(switches::kOriginTrialPublicKey));
}
+ if (command_line->HasSwitch(switches::kOriginTrialDisabledFeatures)) {
+ origin_trial_key_manager()->SetDisabledFeatures(
+ command_line->GetSwitchValueASCII(
+ switches::kOriginTrialDisabledFeatures));
+ }
}
#if defined(OS_ANDROID)

Powered by Google App Engine
This is Rietveld 408576698