| Index: third_party/WebKit/Source/core/origin_trials/OriginTrialContext.cpp
|
| diff --git a/third_party/WebKit/Source/core/origin_trials/OriginTrialContext.cpp b/third_party/WebKit/Source/core/origin_trials/OriginTrialContext.cpp
|
| index a5a268fbb0a580c98c9b4c95175823c4970ca3d3..aafc6c96107edb07d783df9368c10a2ece1c5610 100644
|
| --- a/third_party/WebKit/Source/core/origin_trials/OriginTrialContext.cpp
|
| +++ b/third_party/WebKit/Source/core/origin_trials/OriginTrialContext.cpp
|
| @@ -87,6 +87,7 @@ int getTokenValidationResultPriority(
|
| switch (validationResult) {
|
| case WebOriginTrialTokenStatus::Success:
|
| case WebOriginTrialTokenStatus::Insecure:
|
| + case WebOriginTrialTokenStatus::FeatureDisabled:
|
| // This function should only be used for token validation failures
|
| NOTREACHED();
|
| return 99;
|
| @@ -373,8 +374,10 @@ WebOriginTrialTokenStatus OriginTrialContext::checkFeatureEnabled(const String&
|
| // Check with the validator service to verify the signature and that
|
| // the token is valid for the combination of origin and feature.
|
| WebOriginTrialTokenStatus tokenResult = m_trialTokenValidator->validateToken(token, origin, featureName);
|
| - if (tokenResult == WebOriginTrialTokenStatus::Success) {
|
| - return WebOriginTrialTokenStatus::Success;
|
| + // If the feature is disabled by policy, or if the token is valid, we
|
| + // can return immediately now.
|
| + if (tokenResult == WebOriginTrialTokenStatus::FeatureDisabled || tokenResult == WebOriginTrialTokenStatus::Success) {
|
| + return tokenResult;
|
| }
|
| failedValidationResult = UpdateResultFromValidationFailure(tokenResult, failedValidationResult);
|
| }
|
|
|