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

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

Issue 8585020: Enable CSP by default for extensions with manifest_version >= 2. (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
===================================================================
--- chrome/common/extensions/extension.h (revision 110274)
+++ chrome/common/extensions/extension.h (working copy)
@@ -494,6 +494,7 @@
const std::string& name() const { return name_; }
const std::string& public_key() const { return public_key_; }
const std::string& description() const { return description_; }
+ int manifest_version() const { return manifest_version_; }
bool converted_from_user_script() const {
return converted_from_user_script_;
}
@@ -714,6 +715,14 @@
// The absolute path to the directory the extension is stored in.
FilePath path_;
+ // The version of this extension's manifest. We increase the manifest
+ // version when making breaking changes to the extension system.
+ // Version 1 was the first manifest version (implied by a lack of a
+ // manifest_version attribute in the extension's manifest). We initialize
+ // this member variable to 0 to distinguish the "uninitialized" case from
+ // the case when we know the manifest version actually is 1.
+ int manifest_version_;
+
// Default locale for fall back. Can be empty if extension is not localized.
std::string default_locale_;

Powered by Google App Engine
This is Rietveld 408576698