OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "chrome/common/extensions/manifest_feature.h" |
| 6 |
| 7 #include "chrome/common/extensions/manifest.h" |
| 8 |
| 9 namespace extensions { |
| 10 |
| 11 ManifestFeature::ManifestFeature() { |
| 12 } |
| 13 |
| 14 ManifestFeature::~ManifestFeature() { |
| 15 } |
| 16 |
| 17 Feature::Availability ManifestFeature::IsAvailableToContext( |
| 18 const Extension* extension, |
| 19 Feature::Context context, |
| 20 Feature::Platform platform) const { |
| 21 Availability availability = Feature::IsAvailableToContext(extension, |
| 22 context, |
| 23 platform); |
| 24 if (availability != IS_AVAILABLE) |
| 25 return availability; |
| 26 |
| 27 // We know we can skip manifest()->GetKey() here because we just did the same |
| 28 // validation it would do above. |
| 29 if (!extension->manifest()->value()->HasKey(name())) |
| 30 return NOT_PRESENT; |
| 31 |
| 32 return IS_AVAILABLE; |
| 33 } |
| 34 |
| 35 } // namespace |
OLD | NEW |