Chromium Code Reviews| Index: apps/launcher.cc |
| diff --git a/apps/launcher.cc b/apps/launcher.cc |
| index f8f00517d708dd41cc48835893e8e7bbce676ea0..32372274949a3f8a450501560e9e43916c74f2e2 100644 |
| --- a/apps/launcher.cc |
| +++ b/apps/launcher.cc |
| @@ -390,9 +390,10 @@ void RestartPlatformApp(Profile* profile, const Extension* extension) { |
| extension_service()->extension_prefs(); |
| bool had_windows = extension_prefs->IsActive(extension->id()); |
| extension_prefs->SetIsActive(extension->id(), false); |
| - bool listening_to_launch = event_router-> |
| - ExtensionHasEventListener(extension->id(), |
| - app_runtime::OnLaunched::kEventName); |
| + std::set<std::string> events = |
|
tapted
2013/12/13 04:34:24
nit: you could avoid the local `events` variable w
koz (OOO until 15th September)
2013/12/16 01:49:00
Sam has informed me of ContainsKey() which seems l
|
| + event_router->GetRegisteredEvents(extension->id()); |
| + bool listening_to_launch = |
| + events.find(app_runtime::OnLaunched::kEventName) != events.end(); |
| if (listening_to_launch && had_windows) |
| LaunchPlatformAppWithNoData(profile, extension); |