| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "extensions/common/features/api_feature.h" | |
| 6 | |
| 7 namespace extensions { | |
| 8 | |
| 9 APIFeature::APIFeature() {} | |
| 10 | |
| 11 APIFeature::~APIFeature() { | |
| 12 } | |
| 13 | |
| 14 bool APIFeature::Validate(std::string* error) { | |
| 15 if (!SimpleFeature::Validate(error)) | |
| 16 return false; | |
| 17 | |
| 18 if (contexts().empty()) { | |
| 19 *error = name() + ": API features must specify at least one context."; | |
| 20 return false; | |
| 21 } | |
| 22 | |
| 23 return true; | |
| 24 } | |
| 25 | |
| 26 } // namespace extensions | |
| OLD | NEW |