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

Unified Diff: chrome/common/chrome_content_client.cc

Issue 2047683002: Store Origin Trials public key in browser prefs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 571d73729fbadfa4ca26481182d17fb1d53e655b..c2aec354e700f1c6546226895d9585b1523ee656 100644
--- a/chrome/common/chrome_content_client.cc
+++ b/chrome/common/chrome_content_client.cc
@@ -702,6 +702,16 @@ base::StringPiece ChromeContentClient::GetOriginTrialPublicKey() {
return origin_trial_key_manager_.GetPublicKey();
}
+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.
+ base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
+ if (command_line->HasSwitch(switches::kOriginTrialPublicKey)) {
+ origin_trial_key_manager()->SetPublicKeyFromASCIIString(
+ command_line->GetSwitchValueASCII(switches::kOriginTrialPublicKey));
+ }
+}
+
#if defined(OS_ANDROID)
media::MediaClientAndroid* ChromeContentClient::GetMediaClientAndroid() {
return new ChromeMediaClientAndroid();

Powered by Google App Engine
This is Rietveld 408576698