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

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

Issue 8654001: Reland restrict extension features based on the extension type. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 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 146c53458965a863f2be73195dba7e8b83bff816..85dca3666ce0e98a80709070cc117e15e05cc28e 100644
--- a/chrome/common/extensions/extension.h
+++ b/chrome/common/extensions/extension.h
@@ -30,6 +30,7 @@
class ExtensionAction;
class ExtensionResource;
class ExtensionSidebarDefaults;
+class ManifestValue;
class FileBrowserHandler;
class SkBitmap;
class Version;
@@ -368,7 +369,7 @@ class Extension : public base::RefCountedThreadSafe<Extension> {
// Parses the host and api permissions from the specified permission |key|
// in the manifest |source|.
- bool ParsePermissions(const base::DictionaryValue* source,
+ bool ParsePermissions(const ManifestValue* source,
const char* key,
int flags,
std::string* error,
@@ -525,7 +526,7 @@ class Extension : public base::RefCountedThreadSafe<Extension> {
}
const GURL& update_url() const { return update_url_; }
const ExtensionIconSet& icons() const { return icons_; }
- const base::DictionaryValue* manifest_value() const {
+ const ManifestValue* manifest_value() const {
return manifest_value_.get();
}
const std::string default_locale() const { return default_locale_; }
@@ -608,7 +609,7 @@ class Extension : public base::RefCountedThreadSafe<Extension> {
~Extension();
// Initialize the extension from a parsed manifest.
- bool InitFromValue(const base::DictionaryValue& value, int flags,
+ bool InitFromValue(const ManifestValue& value, int flags,
std::string* error);
// Helper function for implementing HasCachedImage/GetCachedImage. A return
@@ -635,24 +636,22 @@ class Extension : public base::RefCountedThreadSafe<Extension> {
UserScript *instance);
// Helpers to load various chunks of the manifest.
- bool LoadIsApp(const base::DictionaryValue* manifest, std::string* error);
- bool LoadExtent(const base::DictionaryValue* manifest,
+ bool LoadIsApp(const ManifestValue* manifest, std::string* error);
+ bool LoadExtent(const ManifestValue* manifest,
const char* key,
URLPatternSet* extent,
const char* list_error,
const char* value_error,
URLPattern::ParseOption parse_strictness,
std::string* error);
- bool LoadLaunchContainer(const base::DictionaryValue* manifest,
+ bool LoadLaunchContainer(const ManifestValue* manifest,
std::string* error);
- bool LoadLaunchURL(const base::DictionaryValue* manifest,
+ bool LoadLaunchURL(const ManifestValue* manifest,
std::string* error);
- bool LoadAppIsolation(const base::DictionaryValue* manifest,
+ bool LoadAppIsolation(const ManifestValue* manifest,
std::string* error);
- bool LoadWebIntentServices(const base::DictionaryValue& manifest,
+ bool LoadWebIntentServices(const ManifestValue& manifest,
std::string* error);
- bool EnsureNotHybridApp(const base::DictionaryValue* manifest,
- std::string* error);
// Helper method to load an ExtensionAction from the page_action or
// browser_action entries in the manifest.
@@ -675,10 +674,6 @@ class Extension : public base::RefCountedThreadSafe<Extension> {
// an extension that has a browser action and a page action.
bool HasMultipleUISurfaces() const;
- // Figures out if a source contains keys not associated with themes - we
- // don't want to allow scripts and such to be bundled with themes.
- bool ContainsNonThemeKeys(const base::DictionaryValue& source) const;
-
// Updates the launch URL and extents for the extension using the given
// |override_url|.
void OverrideLaunchUrl(const GURL& override_url);
@@ -825,7 +820,7 @@ class Extension : public base::RefCountedThreadSafe<Extension> {
GURL update_url_;
// A copy of the manifest that this extension was created from.
- scoped_ptr<base::DictionaryValue> manifest_value_;
+ scoped_ptr<ManifestValue> manifest_value_;
// A map of chrome:// hostnames (newtab, downloads, etc.) to Extension URLs
// which override the handling of those URLs. (see ExtensionOverrideUI).

Powered by Google App Engine
This is Rietveld 408576698