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

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

Issue 12211029: Sanity tweaks to the extension blacklist: check all extensions at once on (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ready for review Created 7 years, 10 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
Index: chrome/browser/extensions/crx_installer.cc
diff --git a/chrome/browser/extensions/crx_installer.cc b/chrome/browser/extensions/crx_installer.cc
index dd54f0637ba46f167bb5e360d560ebf2a5ef9c1e..77f3875652cf6d4a5ada5b68109632c526fc1513 100644
--- a/chrome/browser/extensions/crx_installer.cc
+++ b/chrome/browser/extensions/crx_installer.cc
@@ -485,7 +485,7 @@ void CrxInstaller::InstallUIAbort(bool user_initiated) {
content::Source<CrxInstaller>(this),
content::NotificationService::NoDetails());
- NotifyCrxInstallComplete(NULL);
+ NotifyCrxInstallComplete(false);
Release(); // balanced in ConfirmInstall().
@@ -581,7 +581,7 @@ void CrxInstaller::ReportFailureFromUIThread(const CrxInstallerError& error) {
if (client_)
client_->OnInstallFailure(error);
- NotifyCrxInstallComplete(NULL);
+ NotifyCrxInstallComplete(false);
// Delete temporary files.
CleanupTempFiles();
@@ -627,20 +627,15 @@ void CrxInstaller::ReportSuccessFromUIThread() {
// Tell the frontend about the installation and hand off ownership of
// extension_ to it.
- frontend_weak_->OnExtensionInstalled(extension_,
- page_ordinal_,
- has_requirement_errors_,
- install_wait_for_idle_);
-
- NotifyCrxInstallComplete(extension_.get());
-
- extension_ = NULL;
-
- // We're done. We don't post any more tasks to ourselves so we are deleted
- // soon.
+ frontend_weak_->InstallExtensionAsync(
+ extension_,
+ page_ordinal_,
+ has_requirement_errors_,
+ install_wait_for_idle_,
+ base::Bind(&CrxInstaller::NotifyCrxInstallComplete, this));
}
-void CrxInstaller::NotifyCrxInstallComplete(const Extension* extension) {
+void CrxInstaller::NotifyCrxInstallComplete(bool success) {
// Some users (such as the download shelf) need to know when a
// CRXInstaller is done. Listening for the EXTENSION_* events
// is problematic because they don't know anything about the
@@ -649,7 +644,11 @@ void CrxInstaller::NotifyCrxInstallComplete(const Extension* extension) {
content::NotificationService::current()->Notify(
chrome::NOTIFICATION_CRX_INSTALLER_DONE,
content::Source<CrxInstaller>(this),
- content::Details<const Extension>(extension));
+ content::Details<const Extension>(success ? extension_.get() : NULL));
+
+ // We're done. We don't post any more tasks to ourselves so we are deleted
+ // soon.
+ extension_ = NULL;
}
void CrxInstaller::CleanupTempFiles() {

Powered by Google App Engine
This is Rietveld 408576698