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

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: Changes per comments Created 8 years, 8 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..862c10766300d95e95a0e47d773991e0daa9d030 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,12 @@ 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.
+ std::vector<std::string> GetUnrecognizedKeys() const {
not at google - send to devlin 2012/04/30 02:32:36 Just call this unrecognized_keys(); this is the st
+ return unrecognized_keys_;
+ }
+
private:
// Returns true if the extension can specify the given |path|.
bool CanAccessPath(const std::string& path) const;
@@ -96,6 +102,9 @@ class Manifest {
// The underlying dictionary representation of the manifest.
scoped_ptr<base::DictionaryValue> value_;
+ // Unrecognized keys (e.g. "permisions": ["tabs"])
+ std::vector<std::string> unrecognized_keys_;
+
DISALLOW_COPY_AND_ASSIGN(Manifest);
};

Powered by Google App Engine
This is Rietveld 408576698