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

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

Issue 8313006: Allow webstore extensions to use experimental permissions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 9 years, 2 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
Index: chrome/common/extensions/extension.h
diff --git a/chrome/common/extensions/extension.h b/chrome/common/extensions/extension.h
index bdf493fbdf20346bae4912fb8554efa01bbcdd65..a97f858ba736f7db657890048ae5dc43703a6ff4 100644
--- a/chrome/common/extensions/extension.h
+++ b/chrome/common/extensions/extension.h
@@ -384,6 +384,14 @@ class Extension : public base::RefCountedThreadSafe<Extension> {
// mechanisms that are implicitly trusted.
bool CanSilentlyIncreasePermissions() const;
+ // Returns true if this extension can specify |api|.
+ bool CanSpecifyAPIPermission(const ExtensionAPIPermission* api,
+ std::string* error) const;
+ bool CanSpecifyComponentOnlyPermission() const;
+ bool CanSpecifyExperimentalPermission() const;
+ bool CanSpecifyPermissionForHostedApp(
+ const ExtensionAPIPermission* api) const;
+
// Whether or not the extension is allowed permission for a URL pattern from
// the manifest. http, https, and chrome://favicon/ is allowed for all
// extensions, while component extensions are allowed access to
@@ -679,15 +687,6 @@ class Extension : public base::RefCountedThreadSafe<Extension> {
// don't want to allow scripts and such to be bundled with themes.
bool ContainsNonThemeKeys(const base::DictionaryValue& source) const;
- // Only allow the experimental API permission if the command line
- // flag is present.
- bool IsDisallowedExperimentalPermission(
- ExtensionAPIPermission::ID permission) const;
-
- // Returns true if this is a component, or we are not attempting to access a
- // component-private permission.
- bool IsComponentOnlyPermission(const ExtensionAPIPermission* api) const;
-
// Updates the launch URL and extents for the extension using the given
// |override_url|.
void OverrideLaunchUrl(const GURL& override_url);

Powered by Google App Engine
This is Rietveld 408576698