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

Side by Side Diff: extensions/common/features/permission_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
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/permission_feature.h" 5 #include "extensions/common/features/permission_feature.h"
6 6
7 #include "extensions/common/permissions/permission_set.h" 7 #include "extensions/common/permissions/permission_set.h"
8 #include "extensions/common/permissions/permissions_data.h" 8 #include "extensions/common/permissions/permissions_data.h"
9 9
10 namespace extensions { 10 namespace extensions {
(...skipping 25 matching lines...) Expand all
36 std::string PermissionFeature::Parse(const base::DictionaryValue* value) { 36 std::string PermissionFeature::Parse(const base::DictionaryValue* value) {
37 std::string error = SimpleFeature::Parse(value); 37 std::string error = SimpleFeature::Parse(value);
38 if (!error.empty()) 38 if (!error.empty())
39 return error; 39 return error;
40 40
41 if (extension_types()->empty()) { 41 if (extension_types()->empty()) {
42 return name() + ": Permission features must specify at least one " + 42 return name() + ": Permission features must specify at least one " +
43 "value for extension_types."; 43 "value for extension_types.";
44 } 44 }
45 45
46 if (!GetContexts()->empty()) 46 if (value->HasKey("contexts"))
47 return name() + ": Permission features do not support contexts."; 47 return name() + ": Permission features do not support contexts.";
48 48
49 return std::string(); 49 return std::string();
50 } 50 }
51 51
52 } // namespace extensions 52 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/common/features/manifest_feature.cc ('k') | extensions/common/features/simple_feature.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698