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

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

Issue 9705083: Unknown options in extension manifest file are silently ignored (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Removed an accedentally-included file 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
Index: chrome/common/extensions/manifest.h
diff --git a/chrome/common/extensions/manifest.h b/chrome/common/extensions/manifest.h
index 43e2caa03127b1421e3067b855372f3e8bb6d20e..5102be44c6ce85b2d2b0eb04aabe3055da3daaab 100644
--- a/chrome/common/extensions/manifest.h
+++ b/chrome/common/extensions/manifest.h
@@ -33,7 +33,7 @@ class Manifest {
// Returns true if all keys in the manifest can be specified by
// the extension type.
- bool ValidateManifest(string16* error) const;
+ bool ValidateManifest(string16* error);
// The version of this extension's manifest. We increase the manifest
// version when making breaking changes to the extension system. If the
@@ -79,6 +79,11 @@ class Manifest {
// Note: only know this when you KNOW you don't need the validation.
base::DictionaryValue* value() const { return value_.get(); }
+ // Gets the list of unrecognized keys in the manifest, if any.
+ // Unrecognized keys are filled in when ValidateManifest is called.
+ bool HasUnrecognizedKeys(
+ const std::vector<const std::string*>** unrecognized_keys) const;
not at google - send to devlin 2012/04/09 13:01:54 The unrecognised keys are unlikely to be a lot of
+
private:
// Returns true if the extension can specify the given |path|.
bool CanAccessPath(const std::string& path) const;
@@ -96,6 +101,9 @@ class Manifest {
// The underlying dictionary representation of the manifest.
scoped_ptr<base::DictionaryValue> value_;
+ // Unrecognized keys (e.g. "permisions": ["tabs"])
+ std::vector<const std::string*> unrecognized_keys_;
not at google - send to devlin 2012/04/09 13:01:54 Make this a scoped_ptr<std::vector<std::string> >
+
DISALLOW_COPY_AND_ASSIGN(Manifest);
};

Powered by Google App Engine
This is Rietveld 408576698