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

Unified Diff: apps/app_load_service.cc

Issue 93593003: Make clicking the restart bubble for crashed apps work. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix .count() Created 7 years 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 | apps/launcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: apps/app_load_service.cc
diff --git a/apps/app_load_service.cc b/apps/app_load_service.cc
index 3526566f1568ecd07f52a2d04a42cc21a920a6df..a9e6bae96ddc940fc982f9f43f0a99537cd3d8a6 100644
--- a/apps/app_load_service.cc
+++ b/apps/app_load_service.cc
@@ -33,7 +33,7 @@ AppLoadService::PostReloadAction::PostReloadAction()
AppLoadService::AppLoadService(Profile* profile)
: profile_(profile) {
registrar_.Add(
- this, chrome::NOTIFICATION_EXTENSION_HOST_DID_STOP_LOADING,
+ this, chrome::NOTIFICATION_EXTENSION_LOADED,
content::NotificationService::AllSources());
registrar_.Add(
this, chrome::NOTIFICATION_EXTENSION_UNLOADED,
@@ -78,13 +78,8 @@ void AppLoadService::Observe(int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) {
switch (type) {
- case chrome::NOTIFICATION_EXTENSION_HOST_DID_STOP_LOADING: {
- extensions::ExtensionHost* host =
- content::Details<extensions::ExtensionHost>(details).ptr();
- const Extension* extension = host->extension();
- // It is possible for an extension to be unloaded before it stops loading.
- if (!extension)
- break;
+ case chrome::NOTIFICATION_EXTENSION_LOADED: {
+ Extension* extension = content::Details<Extension>(details).ptr();
std::map<std::string, PostReloadAction>::iterator it =
post_reload_actions_.find(extension->id());
if (it == post_reload_actions_.end())
« no previous file with comments | « no previous file | apps/launcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698