| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "extensions/common/features/complex_feature.h" | 5 #include "extensions/common/features/complex_feature.h" |
| 6 | 6 |
| 7 #include <set> |
| 8 |
| 7 namespace extensions { | 9 namespace extensions { |
| 8 | 10 |
| 9 ComplexFeature::ComplexFeature(scoped_ptr<FeatureList> features) { | 11 ComplexFeature::ComplexFeature(scoped_ptr<FeatureList> features) { |
| 10 DCHECK_GT(features->size(), 0UL); | 12 DCHECK_GT(features->size(), 0UL); |
| 11 features_.swap(*features); | 13 features_.swap(*features); |
| 12 no_parent_ = features_[0]->no_parent(); | 14 no_parent_ = features_[0]->no_parent(); |
| 13 | 15 |
| 14 #if !defined(NDEBUG) || defined(DCHECK_ALWAYS_ON) | 16 #if !defined(NDEBUG) || defined(DCHECK_ALWAYS_ON) |
| 15 // Verify GetContexts, IsInternal, & IsBlockedInServiceWorker are consistent | 17 // Verify GetContexts, IsInternal, & IsBlockedInServiceWorker are consistent |
| 16 // across all features. | 18 // across all features. |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 Context context) const { | 133 Context context) const { |
| 132 if (result == IS_AVAILABLE) | 134 if (result == IS_AVAILABLE) |
| 133 return std::string(); | 135 return std::string(); |
| 134 | 136 |
| 135 // TODO(justinlin): Form some kind of combined availabilities/messages from | 137 // TODO(justinlin): Form some kind of combined availabilities/messages from |
| 136 // SimpleFeatures. | 138 // SimpleFeatures. |
| 137 return features_[0]->GetAvailabilityMessage(result, type, url, context); | 139 return features_[0]->GetAvailabilityMessage(result, type, url, context); |
| 138 } | 140 } |
| 139 | 141 |
| 140 } // namespace extensions | 142 } // namespace extensions |
| OLD | NEW |