| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/common/extensions/features/complex_feature.h" | 5 #include "extensions/common/features/complex_feature.h" |
| 6 | 6 |
| 7 namespace extensions { | 7 namespace extensions { |
| 8 | 8 |
| 9 ComplexFeature::ComplexFeature(scoped_ptr<FeatureList> features) { | 9 ComplexFeature::ComplexFeature(scoped_ptr<FeatureList> features) { |
| 10 DCHECK_GT(features->size(), 0UL); | 10 DCHECK_GT(features->size(), 0UL); |
| 11 features_.swap(*features); | 11 features_.swap(*features); |
| 12 | 12 |
| 13 #if !defined(NDEBUG) || defined(DCHECK_ALWAYS_ON) | 13 #if !defined(NDEBUG) || defined(DCHECK_ALWAYS_ON) |
| 14 // Verify GetContexts, IsInternal, & IsBlockedInServiceWorker are consistent | 14 // Verify GetContexts, IsInternal, & IsBlockedInServiceWorker are consistent |
| 15 // across all features. | 15 // across all features. |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 Context context) const { | 114 Context context) const { |
| 115 if (result == IS_AVAILABLE) | 115 if (result == IS_AVAILABLE) |
| 116 return std::string(); | 116 return std::string(); |
| 117 | 117 |
| 118 // TODO(justinlin): Form some kind of combined availabilities/messages from | 118 // TODO(justinlin): Form some kind of combined availabilities/messages from |
| 119 // SimpleFeatures. | 119 // SimpleFeatures. |
| 120 return features_[0]->GetAvailabilityMessage(result, type, url, context); | 120 return features_[0]->GetAvailabilityMessage(result, type, url, context); |
| 121 } | 121 } |
| 122 | 122 |
| 123 } // namespace extensions | 123 } // namespace extensions |
| OLD | NEW |