diff options
author | Ben Murdoch <benm@google.com> | 2013-08-07 11:04:47 +0100 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2013-08-07 11:04:47 +0100 |
commit | 3240926e260ce088908e02ac07a6cf7b0c0cbf44 (patch) | |
tree | 5ff5fa16b2fb9278c6d731b3d19123731f3f8626 /apps | |
parent | 3b21a50ee4fe6f71bb117cbee9998a4f465eea9d (diff) | |
download | chromium_org-3240926e260ce088908e02ac07a6cf7b0c0cbf44.tar.gz |
Merge from Chromium at DEPS revision r216133
This commit was generated by merge_to_master.py.
Change-Id: I541d5d1d8520b6b3829fbc1fa18552bf9ad4a5c7
Diffstat (limited to 'apps')
-rw-r--r-- | apps/app_shim/extension_app_shim_handler_mac.cc | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/apps/app_shim/extension_app_shim_handler_mac.cc b/apps/app_shim/extension_app_shim_handler_mac.cc index bf68bca96f..91737670ef 100644 --- a/apps/app_shim/extension_app_shim_handler_mac.cc +++ b/apps/app_shim/extension_app_shim_handler_mac.cc @@ -141,6 +141,8 @@ ExtensionAppShimHandler::ExtensionAppShimHandler() content::NotificationService::AllBrowserContextsAndSources()); registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNINSTALLED, content::NotificationService::AllBrowserContextsAndSources()); + registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_PROCESS_TERMINATED, + content::NotificationService::AllBrowserContextsAndSources()); registrar_.Add(this, chrome::NOTIFICATION_BROWSER_OPENED, content::NotificationService::AllBrowserContextsAndSources()); } @@ -352,9 +354,15 @@ void ExtensionAppShimHandler::Observe( } break; } + case chrome::NOTIFICATION_EXTENSION_PROCESS_TERMINATED: case chrome::NOTIFICATION_EXTENSION_UNINSTALLED: { - const std::string& app_id = - content::Details<extensions::Extension>(details).ptr()->id(); + std::string app_id; + if (type == chrome::NOTIFICATION_EXTENSION_PROCESS_TERMINATED) { + app_id = content::Details<extensions::ExtensionHost>(details).ptr() + ->extension_id(); + } else { + app_id = content::Details<extensions::Extension>(details).ptr()->id(); + } Host* host = FindHost(profile, app_id); if (host) host->OnAppClosed(); |