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

Unified Diff: chrome/common/extensions/extension_permission_set.cc

Issue 9460002: Convert app_bindings.js to the schema_generated_bindings.js infrastructure. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: make test extension ID tests pass Created 8 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/extensions/extension_permission_set.h ('k') | chrome/common/extensions/feature.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/extension_permission_set.cc
diff --git a/chrome/common/extensions/extension_permission_set.cc b/chrome/common/extensions/extension_permission_set.cc
index 60ed1fa25aa42da769c9c69bbd7f25bba5474a61..8dcbab25944bd203d2bc0e9002beb1d86445d4ef 100644
--- a/chrome/common/extensions/extension_permission_set.cc
+++ b/chrome/common/extensions/extension_permission_set.cc
@@ -42,6 +42,7 @@ bool RcdBetterThan(std::string a, std::string b) {
// Names of API modules that can be used without listing it in the
// permissions section of the manifest.
const char* kNonPermissionModuleNames[] = {
+ "app",
"browserAction",
"devtools",
"extension",
@@ -565,6 +566,16 @@ std::set<std::string> ExtensionPermissionSet::GetAPIsAsStrings() const {
return apis_str;
}
+std::set<std::string> ExtensionPermissionSet::
+ GetAPIsWithAnyAccessAsStrings() const {
+ std::set<std::string> result = GetAPIsAsStrings();
+ for (size_t i = 0; i < kNumNonPermissionModuleNames; ++i)
+ result.insert(kNonPermissionModuleNames[i]);
+ for (size_t i = 0; i < kNumNonPermissionFunctionNames; ++i)
+ result.insert(GetPermissionName(kNonPermissionFunctionNames[i]));
+ return result;
+}
+
bool ExtensionPermissionSet::HasAnyAccessToAPI(
const std::string& api_name) const {
if (HasAccessToFunction(api_name))
« no previous file with comments | « chrome/common/extensions/extension_permission_set.h ('k') | chrome/common/extensions/feature.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698