Chromium Code Reviews| 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; |
| } |