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

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

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
« chrome/common/extensions/manifest.h ('K') | « chrome/common/extensions/manifest.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/manifest.cc
diff --git a/chrome/common/extensions/manifest.cc b/chrome/common/extensions/manifest.cc
index 0cf2ef275985c66ad0ef040cd2ceed232fd5dcc5..d05b24998e9b5490a651894010ad5c704699939d 100644
--- a/chrome/common/extensions/manifest.cc
+++ b/chrome/common/extensions/manifest.cc
@@ -25,7 +25,7 @@ Manifest::Manifest(Extension::Location location,
Manifest::~Manifest() {
}
-bool Manifest::ValidateManifest(string16* error) const {
+bool Manifest::ValidateManifest(string16* error) {
for (DictionaryValue::key_iterator key = value_->begin_keys();
key != value_->end_keys(); ++key) {
scoped_ptr<Feature> feature =
@@ -35,6 +35,7 @@ bool Manifest::ValidateManifest(string16* error) const {
// recognized for forward compatibility.
// TODO(aa): Consider having an error here in the case of strict error
// checking to let developers know when they screw up.
+ unrecognized_keys_.push_back(&(*key));
continue;
}
@@ -92,6 +93,16 @@ bool Manifest::GetList(
return CanAccessPath(path) && value_->GetList(path, out_value);
}
+bool Manifest::HasUnrecognizedKeys(
+ const std::vector<const std::string*>** unrecognized_keys) const {
+ if (!unrecognized_keys_.empty()) {
+ *unrecognized_keys = &unrecognized_keys_;
+ return true;
+ }
+
+ return false;
+}
+
Manifest* Manifest::DeepCopy() const {
Manifest* manifest = new Manifest(
location_, scoped_ptr<DictionaryValue>(value_->DeepCopy()));
« chrome/common/extensions/manifest.h ('K') | « chrome/common/extensions/manifest.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698