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

Issue 437493002: mojo: allow BackgroundServiceLoader-loaded apps to Quit themselves. (Closed)

Created:
6 years, 4 months ago by tim (not reviewing)
Modified:
6 years, 4 months ago
CC:
chromium-reviews, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, darin (slow to review), ben+mojo_chromium.org
Project:
chromium
Visibility:
Public.

Description

mojo: allow BackgroundServiceLoader-loaded apps to Quit themselves. You can't Quit() the MessageLoop of a base::Thread. This CL makes BackgroundServiceLoader use DelegateSimpleThread and run a MessageLoop instead of using base::Thread, so that applications can safely Quit() their current MessageLoop as usual to signify that they are done. This shouldn't be necessary for the desktop shell once services are moved out (network, NVS), but we'll likely continue to use this loader on android. Note: the quit_on_shutdown() method is being removed in https://codereview.chromium.org/394903005/ BUG= Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=287475

Patch Set 1 #

Total comments: 10

Patch Set 2 : review #

Patch Set 3 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+229 lines, -257 lines) Patch
M mojo/mojo.gyp View 1 2 2 chunks +3 lines, -2 lines 0 comments Download
M mojo/service_manager/BUILD.gn View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
D mojo/service_manager/background_service_loader.h View 1 chunk +0 lines, -61 lines 0 comments Download
D mojo/service_manager/background_service_loader.cc View 1 chunk +0 lines, -105 lines 0 comments Download
A + mojo/service_manager/background_shell_service_loader.h View 1 3 chunks +41 lines, -19 lines 0 comments Download
A + mojo/service_manager/background_shell_service_loader.cc View 1 2 chunks +59 lines, -46 lines 0 comments Download
A mojo/service_manager/background_shell_service_loader_unittest.cc View 1 chunk +70 lines, -0 lines 0 comments Download
M mojo/service_manager/service_manager_unittest.cc View 1 2 7 chunks +30 lines, -7 lines 0 comments Download
M mojo/shell/context.cc View 3 chunks +24 lines, -15 lines 0 comments Download

Messages

Total messages: 27 (0 generated)
tim (not reviewing)
6 years, 4 months ago (2014-07-31 17:37:07 UTC) #1
tim (not reviewing)
(+ben fyi as we were chatting about this yesterday)
6 years, 4 months ago (2014-07-31 17:39:19 UTC) #2
sky
https://codereview.chromium.org/437493002/diff/100001/mojo/service_manager/background_shell_service_loader.cc File mojo/service_manager/background_shell_service_loader.cc (right): https://codereview.chromium.org/437493002/diff/100001/mojo/service_manager/background_shell_service_loader.cc#newcode15 mojo/service_manager/background_shell_service_loader.cc:15: base::MessageLoop::current()->Quit(); Use a RunLoop. https://codereview.chromium.org/437493002/diff/100001/mojo/service_manager/background_shell_service_loader.cc#newcode59 mojo/service_manager/background_shell_service_loader.cc:59: message_loop_created_.Wait(); Why do ...
6 years, 4 months ago (2014-07-31 20:59:33 UTC) #3
tim (not reviewing)
https://codereview.chromium.org/437493002/diff/100001/mojo/service_manager/background_shell_service_loader.cc File mojo/service_manager/background_shell_service_loader.cc (right): https://codereview.chromium.org/437493002/diff/100001/mojo/service_manager/background_shell_service_loader.cc#newcode15 mojo/service_manager/background_shell_service_loader.cc:15: base::MessageLoop::current()->Quit(); On 2014/07/31 20:59:33, sky wrote: > Use a ...
6 years, 4 months ago (2014-07-31 22:17:28 UTC) #4
sky
https://codereview.chromium.org/437493002/diff/100001/mojo/service_manager/background_shell_service_loader.cc File mojo/service_manager/background_shell_service_loader.cc (right): https://codereview.chromium.org/437493002/diff/100001/mojo/service_manager/background_shell_service_loader.cc#newcode15 mojo/service_manager/background_shell_service_loader.cc:15: base::MessageLoop::current()->Quit(); On 2014/07/31 22:17:28, timsteele wrote: > On 2014/07/31 ...
6 years, 4 months ago (2014-08-04 18:56:25 UTC) #5
tim (not reviewing)
https://codereview.chromium.org/437493002/diff/100001/mojo/service_manager/background_shell_service_loader.cc File mojo/service_manager/background_shell_service_loader.cc (right): https://codereview.chromium.org/437493002/diff/100001/mojo/service_manager/background_shell_service_loader.cc#newcode15 mojo/service_manager/background_shell_service_loader.cc:15: base::MessageLoop::current()->Quit(); On 2014/08/04 18:56:25, sky wrote: > On 2014/07/31 ...
6 years, 4 months ago (2014-08-04 19:51:29 UTC) #6
sky
All the various MessageLoop quit functions are deprecated though. Seems best to post a task ...
6 years, 4 months ago (2014-08-04 20:35:09 UTC) #7
tim (not reviewing)
On 2014/08/04 20:35:09, sky wrote: > All the various MessageLoop quit functions are deprecated though. ...
6 years, 4 months ago (2014-08-04 20:43:55 UTC) #8
sky
My mistake, I look at the code and read 'loop.QuitClosure' to be the message loop, ...
6 years, 4 months ago (2014-08-04 21:49:17 UTC) #9
tim (not reviewing)
The CQ bit was checked by tim@chromium.org
6 years, 4 months ago (2014-08-04 21:57:12 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tim@chromium.org/437493002/140001
6 years, 4 months ago (2014-08-04 21:58:03 UTC) #11
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_dbg_triggered_tests on tryserver.chromium.linux ...
6 years, 4 months ago (2014-08-04 22:07:31 UTC) #12
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 4 months ago (2014-08-04 22:09:36 UTC) #13
commit-bot: I haz the power
Try jobs failed on following builders: ios_rel_device_ninja on tryserver.chromium.mac (http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_rel_device_ninja/builds/1747)
6 years, 4 months ago (2014-08-04 22:09:37 UTC) #14
tim (not reviewing)
The CQ bit was checked by tim@chromium.org
6 years, 4 months ago (2014-08-04 22:12:32 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tim@chromium.org/437493002/160001
6 years, 4 months ago (2014-08-04 22:15:22 UTC) #16
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: mac_gpu on tryserver.chromium.gpu ...
6 years, 4 months ago (2014-08-05 00:09:58 UTC) #17
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 4 months ago (2014-08-05 00:14:59 UTC) #18
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_compile_dbg on tryserver.chromium.mac (http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_compile_dbg/builds/2689)
6 years, 4 months ago (2014-08-05 00:15:00 UTC) #19
tim (not reviewing)
The CQ bit was checked by tim@chromium.org
6 years, 4 months ago (2014-08-05 00:17:43 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tim@chromium.org/437493002/160001
6 years, 4 months ago (2014-08-05 00:20:07 UTC) #21
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: mac_chromium_compile_dbg on tryserver.chromium.mac ...
6 years, 4 months ago (2014-08-05 00:52:23 UTC) #22
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 4 months ago (2014-08-05 01:02:08 UTC) #23
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_compile_dbg on tryserver.chromium.mac (http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_compile_dbg/builds/2702)
6 years, 4 months ago (2014-08-05 01:02:09 UTC) #24
tim (not reviewing)
The CQ bit was checked by tim@chromium.org
6 years, 4 months ago (2014-08-05 06:27:33 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tim@chromium.org/437493002/160001
6 years, 4 months ago (2014-08-05 06:28:50 UTC) #26
commit-bot: I haz the power
6 years, 4 months ago (2014-08-05 07:34:02 UTC) #27
Message was sent while issue was closed.
Change committed as 287475

Powered by Google App Engine
This is Rietveld 408576698