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

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

Issue 407043002: Content Verification: Don't access UI-thread objects on the IO thread (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: added DCHECK Created 6 years, 5 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/browser/extensions/user_script_master.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
« no previous file with comments | « no previous file | chrome/browser/extensions/user_script_master.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698