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

Issue 93593003: Make clicking the restart bubble for crashed apps work. (Closed)

Created:
7 years ago by koz (OOO until 15th September)
Modified:
7 years ago
Reviewers:
tapted
CC:
chromium-reviews, tfarina, chromium-apps-reviews_chromium.org, chrome-apps-syd-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Make clicking the restart bubble for crashed apps work. Previously AppLoadService listened for NOTIFICATION_EXTENSION_HOST_DID_STOP_LOADING before dispatching the onRestarted() event after a reload, but in the case of packaged apps, which use non-persistent background pages, that notification will never get fired. This is because reloading an app doesn't cause its background page to get loaded - only a relevant event causes the page to be woken up. This patch fixes the issue by listening for NOTIFICATION_EXTENSION_LOADED instead, which is always fired after a reload. It also determines whether an extension is listening to an event by checking which events it has registered for, not which ones it currently has a listener for, NOTIFICATION_EXTENSION_LOADED is the notification that listeners get created on, and so to avoid raciness we check registered events (ie: the persisted list of events that an extension is interested in). BUG=327964 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=241162

Patch Set 1 #

Total comments: 2

Patch Set 2 : respond to comments #

Total comments: 4

Patch Set 3 : respond to comments #

Total comments: 2

Patch Set 4 : fix .count() #

Unified diffs Side-by-side diffs Delta from patch set Stats (+11 lines, -14 lines) Patch
M apps/app_load_service.cc View 1 2 chunks +3 lines, -8 lines 0 comments Download
M apps/launcher.cc View 1 2 3 2 chunks +8 lines, -6 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
koz (OOO until 15th September)
7 years ago (2013-12-12 06:17:43 UTC) #1
tapted
https://codereview.chromium.org/93593003/diff/1/apps/app_load_service.cc File apps/app_load_service.cc (right): https://codereview.chromium.org/93593003/diff/1/apps/app_load_service.cc#newcode50 apps/app_load_service.cc:50: RestartPlatformApp(profile_, service->GetExtensionById(extension_id, false)); GetExtensionsById likes to return NULL a ...
7 years ago (2013-12-12 06:54:52 UTC) #2
koz (OOO until 15th September)
https://codereview.chromium.org/93593003/diff/1/apps/app_load_service.cc File apps/app_load_service.cc (right): https://codereview.chromium.org/93593003/diff/1/apps/app_load_service.cc#newcode50 apps/app_load_service.cc:50: RestartPlatformApp(profile_, service->GetExtensionById(extension_id, false)); On 2013/12/12 06:54:52, tapted wrote: > ...
7 years ago (2013-12-13 03:33:56 UTC) #3
tapted
https://codereview.chromium.org/93593003/diff/20001/apps/launcher.cc File apps/launcher.cc (right): https://codereview.chromium.org/93593003/diff/20001/apps/launcher.cc#newcode381 apps/launcher.cc:381: ExtensionHasEventListener(extension->id(), Should this be updated as well, to be ...
7 years ago (2013-12-13 04:34:23 UTC) #4
koz (OOO until 15th September)
https://codereview.chromium.org/93593003/diff/20001/apps/launcher.cc File apps/launcher.cc (right): https://codereview.chromium.org/93593003/diff/20001/apps/launcher.cc#newcode381 apps/launcher.cc:381: ExtensionHasEventListener(extension->id(), On 2013/12/13 04:34:24, tapted wrote: > Should this ...
7 years ago (2013-12-16 01:48:59 UTC) #5
tapted
lgtm with a troll :) Also, it might be good to note in the CL ...
7 years ago (2013-12-16 03:23:17 UTC) #6
koz (OOO until 15th September)
https://codereview.chromium.org/93593003/diff/40001/apps/launcher.cc File apps/launcher.cc (right): https://codereview.chromium.org/93593003/diff/40001/apps/launcher.cc#newcode386 apps/launcher.cc:386: ContainsKey(events, std::string(app_runtime::OnRestarted::kEventName)); On 2013/12/16 03:23:17, tapted wrote: > what's ...
7 years ago (2013-12-16 03:52:35 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/koz@chromium.org/93593003/60001
7 years ago (2013-12-16 23:11:56 UTC) #8
commit-bot: I haz the power
7 years ago (2013-12-17 06:48:26 UTC) #9
Message was sent while issue was closed.
Change committed as 241162

Powered by Google App Engine
This is Rietveld 408576698