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

Unified Diff: content/common/origin_trials/trial_token_validator.cc

Issue 1741783002: Add disabled origin trial feature list (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ef-finch
Patch Set: Separate the introduction of preference-persistence into a different CL 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: content/common/origin_trials/trial_token_validator.cc
diff --git a/content/common/origin_trials/trial_token_validator.cc b/content/common/origin_trials/trial_token_validator.cc
index f9261fe19a30804e5711e6f5dc971ec3870666cb..07e0cf029ad8c5155ce2174115ae160316f7419d 100644
--- a/content/common/origin_trials/trial_token_validator.cc
+++ b/content/common/origin_trials/trial_token_validator.cc
@@ -15,9 +15,12 @@ blink::WebOriginTrialTokenStatus TrialTokenValidator::ValidateToken(
const std::string& token,
const url::Origin& origin,
base::StringPiece feature_name) {
+ ContentClient* content_client = GetContentClient();
Sorin Jianu 2016/06/07 17:20:24 can this be const?
iclelland 2016/06/08 13:37:56 Certainly -- I was thinking at the time that I did
+ if (content_client->IsOriginTrialFeatureDisabled(feature_name))
+ return blink::WebOriginTrialTokenStatus::FeatureDisabled;
+
// TODO(iclelland): Allow for multiple signing keys, and iterate over all
// active keys here. https://crbug.com/543220
- ContentClient* content_client = GetContentClient();
base::StringPiece public_key = content_client->GetOriginTrialPublicKey();
if (public_key.empty()) {
return blink::WebOriginTrialTokenStatus::NotSupported;

Powered by Google App Engine
This is Rietveld 408576698