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

Unified Diff: chrome/common/extensions/extension.h

Issue 4687005: Track permissions granted to extensions in prefs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: missed updating a method call Created 10 years, 1 month 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
Index: chrome/common/extensions/extension.h
diff --git a/chrome/common/extensions/extension.h b/chrome/common/extensions/extension.h
index 6c545e730d1073f39452c65976ae6dc1fea99e6e..91380ec23baaca400263ee2f2b27c34a04551629 100644
--- a/chrome/common/extensions/extension.h
+++ b/chrome/common/extensions/extension.h
@@ -163,6 +163,9 @@ class Extension : public base::RefCountedThreadSafe<Extension> {
// still accepted as meaning the same thing as kUnlimitedStoragePermission.
static const char kOldUnlimitedStoragePermission[];
+ // Valid schemes for web extent URLPatterns.
+ static const int kValidWebExtentSchemes;
+
// Returns true if the string is one of the known hosted app permissions (see
// kHostedAppPermissionNames).
static bool IsHostedAppPermission(const std::string& permission);
@@ -250,8 +253,11 @@ class Extension : public base::RefCountedThreadSafe<Extension> {
std::string* output, bool is_public);
// Determine whether |new_extension| has increased privileges compared to
- // |old_extension|.
- static bool IsPrivilegeIncrease(const Extension* old_extension,
+ // its previously granted permissions, specified by |granted_apis|,
+ // |granted_extent| and |granted_full_access|.
+ static bool IsPrivilegeIncrease(const bool granted_full_access,
+ const std::set<std::string>& granted_apis,
+ const ExtensionExtent& granted_extent,
const Extension* new_extension);
// Given an extension and icon size, read it if present and decode it into
@@ -301,6 +307,13 @@ class Extension : public base::RefCountedThreadSafe<Extension> {
static bool HasApiPermission(const std::set<std::string>& api_permissions,
const std::string& function_name);
+ // Whether the |effective_host_permissions| and |api_permissions| include
+ // effective access to all hosts. See the non-static version of the method
+ // for more details.
+ static bool HasEffectiveAccessToAllHosts(
+ const ExtensionExtent& effective_host_permissions,
+ const std::set<std::string>& api_permissions);
+
bool HasApiPermission(const std::string& function_name) const {
return HasApiPermission(this->api_permissions(), function_name);
}

Powered by Google App Engine
This is Rietveld 408576698