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

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

Issue 377753003: Remove GetContexts() from the public interface of extensions::Feature. It was (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 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 | Annotate | Revision Log
« no previous file with comments | « extensions/common/extension_api_stub.cc ('k') | extensions/common/features/complex_feature.h » ('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 : internal_(false), blocked_in_service_worker_(false) {} 10 : internal_(false), blocked_in_service_worker_(false) {}
(...skipping 10 matching lines...) Expand all
21 } 21 }
22 22
23 std::string APIFeature::Parse(const base::DictionaryValue* value) { 23 std::string APIFeature::Parse(const base::DictionaryValue* value) {
24 std::string error = SimpleFeature::Parse(value); 24 std::string error = SimpleFeature::Parse(value);
25 if (!error.empty()) 25 if (!error.empty())
26 return error; 26 return error;
27 27
28 value->GetBoolean("internal", &internal_); 28 value->GetBoolean("internal", &internal_);
29 value->GetBoolean("blocked_in_service_worker", &blocked_in_service_worker_); 29 value->GetBoolean("blocked_in_service_worker", &blocked_in_service_worker_);
30 30
31 if (GetContexts()->empty()) 31 if (contexts()->empty())
32 return name() + ": API features must specify at least one context."; 32 return name() + ": API features must specify at least one context.";
33 33
34 return std::string(); 34 return std::string();
35 } 35 }
36 36
37 } // namespace extensions 37 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/common/extension_api_stub.cc ('k') | extensions/common/features/complex_feature.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698