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

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

Issue 8725013: Improve ExtensionBrowserTest. Part of moving ExtensionService to use ExtensionSet. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix tests Created 9 years, 1 month 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 | « chrome/browser/extensions/crx_installer.h ('k') | chrome/browser/extensions/crx_installer_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/crx_installer.cc
diff --git a/chrome/browser/extensions/crx_installer.cc b/chrome/browser/extensions/crx_installer.cc
index 934bfd77c932117f3e629cffa409edf5913bc0a3..430b4441242b5610f8df445d5f26568c2f9f77f9 100644
--- a/chrome/browser/extensions/crx_installer.cc
+++ b/chrome/browser/extensions/crx_installer.cc
@@ -459,7 +459,7 @@ void CrxInstaller::InstallUIAbort(bool user_initiated) {
content::NotificationService::NoDetails());
Release(); // balanced in ConfirmInstall().
- NotifyCrxInstallComplete();
+ NotifyCrxInstallComplete(NULL);
// We're done. Since we don't post any more tasks to ourself, our ref count
// should go to zero and we die. The destructor will clean up the temp dir.
@@ -540,7 +540,7 @@ void CrxInstaller::ReportFailureFromUIThread(const std::string& error) {
if (client_)
client_->OnInstallFailure(error);
- NotifyCrxInstallComplete();
+ NotifyCrxInstallComplete(NULL);
}
void CrxInstaller::ReportSuccessFromFileThread() {
@@ -587,22 +587,23 @@ void CrxInstaller::ReportSuccessFromUIThread() {
// extension_ to it.
frontend_weak_->OnExtensionInstalled(extension_, is_gallery_install(),
page_index_);
- extension_ = NULL;
- NotifyCrxInstallComplete();
+ NotifyCrxInstallComplete(extension_.get());
+
+ extension_ = NULL;
// We're done. We don't post any more tasks to ourselves so we are deleted
// soon.
}
-void CrxInstaller::NotifyCrxInstallComplete() {
+void CrxInstaller::NotifyCrxInstallComplete(const Extension* extension) {
// 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
- // extension before it is unpacked, so they can not filter based
+ // extension before it is unpacked, so they cannot filter based
// on the extension.
content::NotificationService::current()->Notify(
chrome::NOTIFICATION_CRX_INSTALLER_DONE,
content::Source<CrxInstaller>(this),
- content::NotificationService::NoDetails());
+ content::Details<const Extension>(extension));
}
« no previous file with comments | « chrome/browser/extensions/crx_installer.h ('k') | chrome/browser/extensions/crx_installer_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698