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

Unified Diff: chrome/common/chrome_content_client.cc

Issue 2049783002: Refactor OriginTrialPolicy to be an abstract interface in content/public/common (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ef-add-revoked-feature-list
Patch Set: Fix comment 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 f4414936e8e0e89a3495aec4073693e75ea35484..a476bd4a89b76c140cb658dae7806b95ddd8d047 100644
--- a/chrome/common/chrome_content_client.cc
+++ b/chrome/common/chrome_content_client.cc
@@ -700,8 +700,19 @@ bool ChromeContentClient::IsSupplementarySiteIsolationModeEnabled() {
#endif
}
-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_policy_.SetPublicKeyFromASCIIString(
+ command_line->GetSwitchValueASCII(switches::kOriginTrialPublicKey));
+ }
+}
+
+const content::OriginTrialPolicy* ChromeContentClient::GetOriginTrialPolicy()
+ const {
+ return &origin_trial_policy_;
}
#if defined(OS_ANDROID)

Powered by Google App Engine
This is Rietveld 408576698