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

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

Issue 12084034: Change manifest handler interface to always (implicitly) pass the entire manifest to handlers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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/extension.cc
diff --git a/chrome/common/extensions/extension.cc b/chrome/common/extensions/extension.cc
index ab66dc98cf2d9adb729301b6c039db3a4a621686..4ce0daac325636e990d6ee63326451ef62854891 100644
--- a/chrome/common/extensions/extension.cc
+++ b/chrome/common/extensions/extension.cc
@@ -2391,15 +2391,12 @@ bool Extension::LoadExtensionFeatures(APIPermissionSet* api_permissions,
}
bool Extension::LoadManifestHandlerFeatures(string16* error) {
- std::vector<std::string> keys = ManifestHandler::GetKeys();
- for (size_t i = 0; i < keys.size(); ++i) {
- Value* value = NULL;
- if (!manifest_->Get(keys[i], &value)) {
- if (!ManifestHandler::Get(keys[i])->HasNoKey(this, error))
- return false;
- } else if (!ManifestHandler::Get(keys[i])->Parse(value, this, error)) {
+ std::set<ManifestHandler*> handlers =
+ ManifestHandler::GetHandlers(manifest());
Matt Perry 2013/01/29 00:58:47 Rather than returning a temporary set that the cal
Yoyo Zhou 2013/01/29 04:32:42 Sure.
+ for (std::set<ManifestHandler*>::iterator it = handlers.begin();
+ it != handlers.end(); ++it) {
+ if (!(*it)->Parse(this, error))
return false;
- }
}
return true;
}

Powered by Google App Engine
This is Rietveld 408576698