Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(50)

Side by Side Diff: extensions/common/features/api_feature.cc

Issue 2151583003: [Extensions] Add extension feature generation code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Include fix Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/test/BUILD.gn ('k') | extensions/common/features/base_feature_provider_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/api_feature.h" 5 #include "extensions/common/features/api_feature.h"
6 6
7 namespace extensions { 7 namespace extensions {
8 8
9 APIFeature::APIFeature() {} 9 APIFeature::APIFeature() {}
10 10
11 APIFeature::~APIFeature() { 11 APIFeature::~APIFeature() {
12 } 12 }
13 13
14 bool APIFeature::Validate(std::string* error) { 14 bool APIFeature::Validate(std::string* error) {
15 if (!SimpleFeature::Validate(error)) 15 if (!SimpleFeature::Validate(error))
16 return false; 16 return false;
17 17
18 if (contexts()->empty()) { 18 if (contexts().empty()) {
19 *error = name() + ": API features must specify at least one context."; 19 *error = name() + ": API features must specify at least one context.";
20 return false; 20 return false;
21 } 21 }
22 22
23 return true; 23 return true;
24 } 24 }
25 25
26 } // namespace extensions 26 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/test/BUILD.gn ('k') | extensions/common/features/base_feature_provider_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698