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

Unified Diff: trunk/src/apps/app_load_service.cc

Issue 127843005: Revert 241162 "Make clicking the restart bubble for crashed apps..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 11 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 | trunk/src/apps/launcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/apps/app_load_service.cc
===================================================================
--- trunk/src/apps/app_load_service.cc (revision 243700)
+++ trunk/src/apps/app_load_service.cc (working copy)
@@ -33,7 +33,7 @@
AppLoadService::AppLoadService(Profile* profile)
: profile_(profile) {
registrar_.Add(
- this, chrome::NOTIFICATION_EXTENSION_LOADED,
+ this, chrome::NOTIFICATION_EXTENSION_HOST_DID_STOP_LOADING,
content::NotificationService::AllSources());
registrar_.Add(
this, chrome::NOTIFICATION_EXTENSION_UNLOADED,
@@ -78,8 +78,13 @@
const content::NotificationSource& source,
const content::NotificationDetails& details) {
switch (type) {
- case chrome::NOTIFICATION_EXTENSION_LOADED: {
- Extension* extension = content::Details<Extension>(details).ptr();
+ 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;
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 | trunk/src/apps/launcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698