Chromium Code Reviews| 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 namespace extensions { | 7 namespace extensions { |
| 8 | 8 |
| 9 ComplexFeature::ComplexFeature(std::unique_ptr<FeatureList> features) { | 9 ComplexFeature::ComplexFeature(std::unique_ptr<FeatureList> features) { |
| 10 DCHECK_GT(features->size(), 0UL); | 10 DCHECK_GT(features->size(), 0UL); |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 95 } | 95 } |
| 96 return false; | 96 return false; |
| 97 } | 97 } |
| 98 | 98 |
| 99 bool ComplexFeature::IsInternal() const { | 99 bool ComplexFeature::IsInternal() const { |
| 100 // Constructor verifies that composed features are consistent, thus we can | 100 // Constructor verifies that composed features are consistent, thus we can |
| 101 // return just the first feature's value. | 101 // return just the first feature's value. |
| 102 return features_[0]->IsInternal(); | 102 return features_[0]->IsInternal(); |
| 103 } | 103 } |
| 104 | 104 |
| 105 std::string ComplexFeature::GetAvailabilityMessage(AvailabilityResult result, | |
|
Devlin
2016/07/08 21:20:21
Strangely, the only time this is actually called i
lazyboy
2016/07/12 00:35:12
Acknowledged.
| |
| 106 Manifest::Type type, | |
| 107 const GURL& url, | |
| 108 Context context) const { | |
| 109 if (result == IS_AVAILABLE) | |
| 110 return std::string(); | |
| 111 | |
| 112 // TODO(justinlin): Form some kind of combined availabilities/messages from | |
| 113 // SimpleFeatures. | |
| 114 return features_[0]->GetAvailabilityMessage(result, type, url, context); | |
| 115 } | |
| 116 | |
| 117 } // namespace extensions | 105 } // namespace extensions |
| OLD | NEW |