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

Unified Diff: chrome/browser/chrome_browser_main.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
« no previous file with comments | « no previous file | chrome/browser/chrome_content_browser_client.cc » ('j') | chrome/common/chrome_switches.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_browser_main.cc
diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc
index 68c6df03d3a20620a9704419c356d73e7c20cfaf..dbaa0a2a32aa11b304fcda2b3d57d342664b6250 100644
--- a/chrome/browser/chrome_browser_main.cc
+++ b/chrome/browser/chrome_browser_main.cc
@@ -818,6 +818,27 @@ void ChromeBrowserMainParts::SetupOriginTrials() {
switches::kOriginTrialPublicKey,
local_state_->GetString(prefs::kOriginTrialPublicKey));
}
+ if (!command_line->HasSwitch(switches::kOriginTrialDisabledFeatures)) {
+ const base::ListValue* override_disabled_feature_list =
+ local_state_->GetList(prefs::kOriginTrialDisabledFeatures);
+ std::string disabled_feature;
+ std::vector<std::string> disabled_features;
chasej 2016/06/08 16:14:24 Nit: Should these be moved inside the if (override
iclelland 2016/06/08 17:43:44 Done.
+ if (override_disabled_feature_list) {
+ for (const auto& item : *override_disabled_feature_list) {
+ if (item->GetAsString(&disabled_feature)) {
+ disabled_features.push_back(disabled_feature);
+ }
+ }
+ if (!disabled_features.empty()) {
+ const std::string override_disabled_features =
+ base::JoinString(disabled_features, "|");
+ base::CommandLine* command_line =
+ base::CommandLine::ForCurrentProcess();
chasej 2016/06/08 16:14:24 This should use the command_line variable from the
iclelland 2016/06/08 17:43:44 Done.
+ command_line->AppendSwitchASCII(switches::kOriginTrialDisabledFeatures,
+ override_disabled_features);
+ }
+ }
+ }
}
// -----------------------------------------------------------------------------
« no previous file with comments | « no previous file | chrome/browser/chrome_content_browser_client.cc » ('j') | chrome/common/chrome_switches.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698