| Index: extensions/common/features/complex_feature.cc
|
| diff --git a/extensions/common/features/complex_feature.cc b/extensions/common/features/complex_feature.cc
|
| index ae7327cf174dcce8626c06ac4c241ac73716be8c..eeb4f776a4df21ed07a1eea2d2550a89557a036c 100644
|
| --- a/extensions/common/features/complex_feature.cc
|
| +++ b/extensions/common/features/complex_feature.cc
|
| @@ -9,6 +9,7 @@ namespace extensions {
|
| ComplexFeature::ComplexFeature(scoped_ptr<FeatureList> features) {
|
| DCHECK_GT(features->size(), 0UL);
|
| features_.swap(*features);
|
| + no_parent_ = features_[0]->no_parent();
|
|
|
| #if !defined(NDEBUG) || defined(DCHECK_ALWAYS_ON)
|
| // Verify GetContexts, IsInternal, & IsBlockedInServiceWorker are consistent
|
| @@ -29,6 +30,9 @@ ComplexFeature::ComplexFeature(scoped_ptr<FeatureList> features) {
|
| DCHECK(first_blocked_in_service_worker == (*it)->IsBlockedInServiceWorker())
|
| << "Complex feature must have consistent values of "
|
| "blocked_in_service_worker across all sub features.";
|
| + DCHECK(no_parent_ == (*it)->no_parent())
|
| + << "Complex feature must have consistent values of "
|
| + "no_parent across all sub features.";
|
| }
|
| #endif
|
| }
|
| @@ -82,6 +86,16 @@ Feature::Availability ComplexFeature::IsAvailableToContext(
|
| return first_availability;
|
| }
|
|
|
| +bool ComplexFeature::IsIdInBlacklist(const std::string& extension_id) const {
|
| + for (FeatureList::const_iterator it = features_.begin();
|
| + it != features_.end();
|
| + ++it) {
|
| + if ((*it)->IsIdInBlacklist(extension_id))
|
| + return true;
|
| + }
|
| + return false;
|
| +}
|
| +
|
| bool ComplexFeature::IsIdInWhitelist(const std::string& extension_id) const {
|
| for (FeatureList::const_iterator it = features_.begin();
|
| it != features_.end();
|
|
|