| Index: chrome/common/extensions/features/api_feature.cc
|
| diff --git a/chrome/common/extensions/features/api_feature.cc b/chrome/common/extensions/features/api_feature.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..09b8c1923916813aca232fdc58e121ea0a31c308
|
| --- /dev/null
|
| +++ b/chrome/common/extensions/features/api_feature.cc
|
| @@ -0,0 +1,26 @@
|
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "chrome/common/extensions/features/api_feature.h"
|
| +
|
| +namespace extensions {
|
| +
|
| +APIFeature::APIFeature() {
|
| +}
|
| +
|
| +APIFeature::~APIFeature() {
|
| +}
|
| +
|
| +std::string APIFeature::Parse(const DictionaryValue* value) {
|
| + std::string error = SimpleFeature::Parse(value);
|
| + if (!error.empty())
|
| + return error;
|
| +
|
| + if (GetContexts()->empty())
|
| + return name() + ": API features must specify at least one context.";
|
| +
|
| + return "";
|
| +}
|
| +
|
| +} // namespace
|
|
|