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

Unified Diff: chrome/browser/extensions/extension_service.cc

Issue 7585003: Fix to make Chromium more verbose about component extension loading error (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 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
« no previous file with comments | « no previous file | chrome/common/extensions/extension_file_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « no previous file | chrome/common/extensions/extension_file_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698