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

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: Const correctness; clear disabled features 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..4b2af53577ee0e048c8f8318a932e628dfcb3285 100644
--- a/chrome/common/chrome_content_client.cc
+++ b/chrome/common/chrome_content_client.cc
@@ -698,18 +698,28 @@ bool ChromeContentClient::IsSupplementarySiteIsolationModeEnabled() {
#endif
}
-base::StringPiece ChromeContentClient::GetOriginTrialPublicKey() {
+base::StringPiece ChromeContentClient::GetOriginTrialPublicKey() const {
return origin_trial_key_manager_.GetPublicKey();
}
+bool ChromeContentClient::IsOriginTrialFeatureDisabled(
+ base::StringPiece feature) const {
+ 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