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

Unified Diff: chrome/browser/chrome_browser_main.cc

Issue 2733023002: [Origin Trials] Support updates of disabled token list (Closed)
Patch Set: Address comments Created 3 years, 9 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') | no next file with comments »
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 247a0087218d4183e8d3d48501a52009c62a4dad..40d550d1e4740116838c28c1052ff3143b96b912 100644
--- a/chrome/browser/chrome_browser_main.cc
+++ b/chrome/browser/chrome_browser_main.cc
@@ -870,6 +870,25 @@ void ChromeBrowserMainParts::SetupOriginTrialsCommandLine() {
}
}
}
+ if (!command_line->HasSwitch(switches::kOriginTrialDisabledTokens)) {
+ const base::ListValue* disabled_token_list =
+ local_state_->GetList(prefs::kOriginTrialDisabledTokens);
+ if (disabled_token_list) {
+ std::vector<std::string> disabled_tokens;
+ std::string disabled_token;
+ for (const auto& item : *disabled_token_list) {
+ if (item->GetAsString(&disabled_token)) {
+ disabled_tokens.push_back(disabled_token);
+ }
+ }
+ if (!disabled_tokens.empty()) {
+ const std::string disabled_token_switch =
+ base::JoinString(disabled_tokens, "|");
+ command_line->AppendSwitchASCII(switches::kOriginTrialDisabledTokens,
+ disabled_token_switch);
+ }
+ }
+ }
}
// -----------------------------------------------------------------------------
« no previous file with comments | « no previous file | chrome/browser/chrome_content_browser_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698