Index: chrome/browser/extensions/extension_system_impl.cc |
diff --git a/chrome/browser/extensions/extension_system_impl.cc b/chrome/browser/extensions/extension_system_impl.cc |
index ee61be99148f93dd989c94b9f2205dc536f742c0..771524ebe5ea61801366955afd18a46929d2b934 100644 |
--- a/chrome/browser/extensions/extension_system_impl.cc |
+++ b/chrome/browser/extensions/extension_system_impl.cc |
@@ -222,7 +222,15 @@ class ContentVerifierDelegateImpl : public ContentVerifierDelegate { |
} |
virtual void VerifyFailed(const std::string& extension_id) OVERRIDE { |
- if (service_) |
+ if (!service_) |
+ return; |
+ ExtensionRegistry* registry = ExtensionRegistry::Get(service_->profile()); |
+ const Extension* extension = |
+ registry->GetExtensionById(extension_id, ExtensionRegistry::EVERYTHING); |
+ if (!extension) |
+ return; |
+ Mode mode = ShouldBeVerified(*extension); |
+ if (mode >= ContentVerifierDelegate::ENFORCE) |
service_->DisableExtension(extension_id, Extension::DISABLE_CORRUPTED); |
} |
@@ -324,7 +332,7 @@ void ExtensionSystemImpl::Shared::Init(bool extensions_enabled) { |
#if defined(OS_CHROMEOS) |
mode = std::max(mode, ContentVerifierDelegate::BOOTSTRAP); |
#endif |
- if (mode > ContentVerifierDelegate::BOOTSTRAP) |
+ if (mode >= ContentVerifierDelegate::BOOTSTRAP) |
content_verifier_->Start(); |
info_map()->SetContentVerifier(content_verifier_.get()); |