| Index: content/common/feature_policy/feature_policy.cc
|
| diff --git a/content/common/feature_policy/feature_policy.cc b/content/common/feature_policy/feature_policy.cc
|
| index 9494574587d983312b0292d6019f3fd970d01713..96a92cbc6920ca1fd7c21c4beec5f426f42a8b4e 100644
|
| --- a/content/common/feature_policy/feature_policy.cc
|
| +++ b/content/common/feature_policy/feature_policy.cc
|
| @@ -42,6 +42,12 @@ ParsedFeaturePolicyDeclaration::ParsedFeaturePolicyDeclaration(
|
|
|
| ParsedFeaturePolicyDeclaration::~ParsedFeaturePolicyDeclaration() {}
|
|
|
| +bool operator==(const ParsedFeaturePolicyDeclaration& lhs,
|
| + const ParsedFeaturePolicyDeclaration& rhs) {
|
| + return std::tie(lhs.feature, lhs.matches_all_origins, lhs.origins) ==
|
| + std::tie(rhs.feature, rhs.matches_all_origins, rhs.origins);
|
| +}
|
| +
|
| FeaturePolicy::Whitelist::Whitelist() : matches_all_origins_(false) {}
|
|
|
| FeaturePolicy::Whitelist::Whitelist(const Whitelist& rhs) = default;
|
| @@ -112,9 +118,8 @@ bool FeaturePolicy::IsFeatureEnabledForOrigin(
|
| auto whitelist = whitelists_.find(feature);
|
| if (whitelist != whitelists_.end())
|
| return whitelist->second->Contains(origin);
|
| - if (default_policy == FeaturePolicy::FeatureDefault::EnableForAll) {
|
| + if (default_policy == FeaturePolicy::FeatureDefault::EnableForAll)
|
| return true;
|
| - }
|
| if (default_policy == FeaturePolicy::FeatureDefault::EnableForSelf) {
|
| // TODO(iclelland): Remove the pointer equality check once it is possible to
|
| // compare opaque origins successfully against themselves.
|
|
|