Index: chrome/browser/extensions/extension_service.cc |
diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc |
index 5c05c6cb9b16dba738258e193fd3224aac37b1c0..2bb318da6798aafc96f47e73a4f43249c94e661c 100644 |
--- a/chrome/browser/extensions/extension_service.cc |
+++ b/chrome/browser/extensions/extension_service.cc |
@@ -1077,7 +1077,7 @@ const Extension* ExtensionService::LoadComponentExtension( |
JSONStringValueSerializer serializer(info.manifest); |
scoped_ptr<Value> manifest(serializer.Deserialize(NULL, NULL)); |
if (!manifest.get()) { |
- DLOG(ERROR) << "Failed to parse manifest for extension"; |
+ LOG(ERROR) << "Failed to parse manifest for extension"; |
return NULL; |
} |
@@ -1092,9 +1092,12 @@ const Extension* ExtensionService::LoadComponentExtension( |
flags, |
&error)); |
if (!extension.get()) { |
- NOTREACHED() << error; |
+ LOG(ERROR) << error; |
return NULL; |
} |
+ if (!extension_file_util::ValidateExtension(extension, &error)) { |
Aaron Boodman
2011/08/08 21:31:42
Please remove this.
Component extensions must be
hashimoto
2011/08/09 06:19:52
Thank you for your detailed explanation.
I abando
|
+ LOG(ERROR) << error; |
+ } |
AddExtension(extension); |
return extension; |
} |
@@ -1104,7 +1107,7 @@ void ExtensionService::UnloadComponentExtension( |
JSONStringValueSerializer serializer(info.manifest); |
scoped_ptr<Value> manifest(serializer.Deserialize(NULL, NULL)); |
if (!manifest.get()) { |
- DLOG(ERROR) << "Failed to parse manifest for extension"; |
+ LOG(ERROR) << "Failed to parse manifest for extension"; |
return; |
} |
std::string public_key; |
@@ -1114,7 +1117,7 @@ void ExtensionService::UnloadComponentExtension( |
GetString(extension_manifest_keys::kPublicKey, &public_key) || |
!Extension::ParsePEMKeyBytes(public_key, &public_key_bytes) || |
!Extension::GenerateId(public_key_bytes, &id)) { |
- DLOG(ERROR) << "Failed to get extension id"; |
+ LOG(ERROR) << "Failed to get extension id"; |
return; |
} |
UnloadExtension(id, UnloadedExtensionInfo::DISABLE); |