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

Unified Diff: trunk/src/apps/launcher.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 | « trunk/src/apps/app_load_service.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/apps/launcher.cc
===================================================================
--- trunk/src/apps/launcher.cc (revision 243700)
+++ trunk/src/apps/launcher.cc (working copy)
@@ -380,12 +380,9 @@
#endif
extensions::EventRouter* event_router =
ExtensionSystem::Get(profile)->event_router();
- // We check for registered events, rather than listeners, because listeners
- // may not be instantiated for the events yet.
- std::set<std::string> events =
- event_router->GetRegisteredEvents(extension->id());
- bool listening_to_restart =
- events.count(app_runtime::OnRestarted::kEventName) > 0;
+ bool listening_to_restart = event_router->
+ ExtensionHasEventListener(extension->id(),
+ app_runtime::OnRestarted::kEventName);
if (listening_to_restart) {
extensions::AppEventRouter::DispatchOnRestartedEvent(profile, extension);
@@ -396,8 +393,9 @@
extension_service()->extension_prefs();
bool had_windows = extension_prefs->IsActive(extension->id());
extension_prefs->SetIsActive(extension->id(), false);
- bool listening_to_launch =
- events.count(app_runtime::OnLaunched::kEventName) > 0;
+ bool listening_to_launch = event_router->
+ ExtensionHasEventListener(extension->id(),
+ app_runtime::OnLaunched::kEventName);
if (listening_to_launch && had_windows)
LaunchPlatformAppWithNoData(profile, extension);
« no previous file with comments | « trunk/src/apps/app_load_service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698