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

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

Issue 2123323004: Simplify OriginTrialContext and the way it validates tokens. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mark enum as obsolete Created 4 years, 5 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 | « content/common/origin_trials/trial_token.h ('k') | content/common/origin_trials/trial_token_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/origin_trials/trial_token.cc
diff --git a/content/common/origin_trials/trial_token.cc b/content/common/origin_trials/trial_token.cc
index 65980de3575a8d02fef99f0d37fe9e0dde73b001..2935d9cc87642a195871f365e8d9e04ad20efbe2 100644
--- a/content/common/origin_trials/trial_token.cc
+++ b/content/common/origin_trials/trial_token.cc
@@ -61,18 +61,14 @@ std::unique_ptr<TrialToken> TrialToken::From(
return token;
}
-blink::WebOriginTrialTokenStatus TrialToken::IsValidForFeature(
+blink::WebOriginTrialTokenStatus TrialToken::IsValid(
const url::Origin& origin,
- base::StringPiece feature_name,
const base::Time& now) const {
// The order of these checks is intentional. For example, will only report a
- // token as expired if it is valid for the origin + feature combination.
+ // token as expired if it is valid for the origin.
if (!ValidateOrigin(origin)) {
return blink::WebOriginTrialTokenStatus::WrongOrigin;
}
- if (!ValidateFeatureName(feature_name)) {
- return blink::WebOriginTrialTokenStatus::WrongFeature;
- }
if (!ValidateDate(now)) {
return blink::WebOriginTrialTokenStatus::Expired;
}
« no previous file with comments | « content/common/origin_trials/trial_token.h ('k') | content/common/origin_trials/trial_token_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698