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

Issue 281353005: Mojo: nuke EnvironmentData (Closed)

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

Description

Mojo: nuke EnvironmentData With this change, Mojo applications that link against mojo_environment_chromium do not need to instantiate mojo::Environment. We rely on AtExitManager for all finalization of singleton objects. This frees us up to use the familiar base::Singleton and base::LazyInstance for any such state. Tests can use ShadowingAtExitManager to clean the environment between test runs. It becomes a link error to use mojo::Environment if you are not linking against mojo_environment_standalone. I plan to follow this up with a change that buries mojo::Environment for the case where you are linking against mojo_environment_standalone. Ideally, this means no one will ever need to think about mojo::Environment again. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=277265

Patch Set 1 #

Patch Set 2 : fix #

Patch Set 3 : update #

Patch Set 4 : rebase + remove unnecessary usage of mojo::Environment #

Patch Set 5 : update #

Patch Set 6 : rebase #

Patch Set 7 : class -> struct, sigh #

Patch Set 8 : remove unused variable #

Patch Set 9 : rebase #

Patch Set 10 : fix mac #

Patch Set 11 : fix android build #

Patch Set 12 : try again #

Patch Set 13 : try disabling CheckLayoutSystemDeps #

Patch Set 14 : rebase #

Patch Set 15 : rebase #

Patch Set 16 : rebase #

Patch Set 17 : rebase #

Total comments: 2

Patch Set 18 : Add ShadowingAtExitManager to android/javatests/mojo_test_case.cc #

Patch Set 19 : Fix android build by defining UNIT_TEST #

Patch Set 20 : fix gn #

Unified diffs Side-by-side diffs Delta from patch set Stats (+24 lines, -210 lines) Patch
M content/app/content_main_runner.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +0 lines, -4 lines 0 comments Download
M content/app/mojo/mojo_init.h View 1 2 3 1 chunk +0 lines, -2 lines 0 comments Download
M content/app/mojo/mojo_init.cc View 1 2 3 1 chunk +0 lines, -14 lines 0 comments Download
M content/test/content_test_launcher.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +0 lines, -8 lines 0 comments Download
M mojo/android/javatests/mojo_test_case.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +2 lines, -1 line 0 comments Download
M mojo/apps/js/test/js_to_cpp_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +2 lines, -2 lines 0 comments Download
M mojo/common/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +0 lines, -2 lines 0 comments Download
D mojo/common/environment_data.h View 1 chunk +0 lines, -52 lines 0 comments Download
D mojo/common/environment_data.cc View 1 chunk +0 lines, -51 lines 0 comments Download
M mojo/common/handle_watcher.cc View 1 2 3 4 5 6 7 4 chunks +3 lines, -21 lines 0 comments Download
M mojo/common/handle_watcher_unittest.cc View 1 2 3 3 chunks +3 lines, -4 lines 0 comments Download
M mojo/environment/environment.cc View 1 2 3 4 1 chunk +5 lines, -21 lines 0 comments Download
M mojo/mojo.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +3 lines, -2 lines 0 comments Download
M mojo/public/cpp/environment/environment.h View 1 chunk +0 lines, -5 lines 0 comments Download
M mojo/public/cpp/environment/lib/environment.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -1 line 0 comments Download
M mojo/service_manager/service_manager_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +2 lines, -2 lines 0 comments Download
M mojo/services/dbus_echo/dbus_echo_service.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +0 lines, -1 line 0 comments Download
M mojo/services/view_manager/view_manager_connection_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +2 lines, -1 line 0 comments Download
M mojo/shell/android/mojo_main.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +0 lines, -7 lines 0 comments Download
M mojo/shell/context.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -1 line 0 comments Download
M mojo/shell/desktop/mojo_main.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +0 lines, -2 lines 0 comments Download
M mojo/shell/shell_test_base.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +0 lines, -3 lines 0 comments Download
M mojo/shell/shell_test_helper.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +0 lines, -3 lines 0 comments Download

Messages

Total messages: 43 (0 generated)
darin (slow to review)
This depends on https://codereview.chromium.org/282823003/
6 years, 7 months ago (2014-05-15 03:54:25 UTC) #1
darin (slow to review)
sky: this is ready for review
6 years, 7 months ago (2014-05-15 23:46:18 UTC) #2
sky
Nice, LGTM
6 years, 7 months ago (2014-05-16 15:14:53 UTC) #3
darin (slow to review)
The CQ bit was checked by darin@chromium.org
6 years, 7 months ago (2014-05-16 15:35:53 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/darin@chromium.org/281353005/80001
6 years, 7 months ago (2014-05-16 15:36:05 UTC) #5
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). Please consider checking whether the failures are ...
6 years, 7 months ago (2014-05-16 15:52:43 UTC) #6
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 7 months ago (2014-05-16 15:56:01 UTC) #7
commit-bot: I haz the power
Try jobs failed on following builders: android_clang_dbg on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/android_clang_dbg/builds/143241) chromium_presubmit on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/chromium_presubmit/builds/68141)
6 years, 7 months ago (2014-05-16 15:56:01 UTC) #8
darin (slow to review)
The CQ bit was checked by darin@chromium.org
6 years, 7 months ago (2014-05-16 18:20:02 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/darin@chromium.org/281353005/100001
6 years, 7 months ago (2014-05-16 18:20:54 UTC) #10
darin (slow to review)
The CQ bit was checked by darin@chromium.org
6 years, 7 months ago (2014-05-17 04:42:43 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/darin@chromium.org/281353005/120001
6 years, 7 months ago (2014-05-17 04:43:54 UTC) #12
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). Please consider checking whether the failures are ...
6 years, 7 months ago (2014-05-17 10:46:40 UTC) #13
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 7 months ago (2014-05-17 11:04:08 UTC) #14
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_clang_dbg on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/linux_chromium_clang_dbg/builds/26166)
6 years, 7 months ago (2014-05-17 11:04:09 UTC) #15
darin (slow to review)
The CQ bit was checked by darin@chromium.org
6 years, 7 months ago (2014-05-17 20:40:41 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/darin@chromium.org/281353005/140001
6 years, 7 months ago (2014-05-17 20:40:48 UTC) #17
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). Please consider checking whether the failures are ...
6 years, 7 months ago (2014-05-17 22:16:49 UTC) #18
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 7 months ago (2014-05-17 22:52:45 UTC) #19
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/mac_chromium_rel/builds/30028)
6 years, 7 months ago (2014-05-17 22:52:45 UTC) #20
darin (slow to review)
The CQ bit was checked by darin@chromium.org
6 years, 7 months ago (2014-05-22 23:40:56 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/darin@chromium.org/281353005/180001
6 years, 7 months ago (2014-05-22 23:43:46 UTC) #22
darin (slow to review)
The CQ bit was checked by darin@chromium.org
6 years, 7 months ago (2014-05-23 03:15:48 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/darin@chromium.org/281353005/200001
6 years, 7 months ago (2014-05-23 03:17:44 UTC) #24
commit-bot: I haz the power
Change committed as 272472
6 years, 7 months ago (2014-05-23 10:41:16 UTC) #25
Ken Russell (switch to Gerrit)
On 2014/05/23 10:41:16, I haz the power (commit-bot) wrote: > Change committed as 272472 This ...
6 years, 7 months ago (2014-05-23 21:02:24 UTC) #26
darin (slow to review)
The CQ bit was checked by darin@chromium.org
6 years, 7 months ago (2014-05-24 17:07:44 UTC) #27
darin (slow to review)
The CQ bit was unchecked by darin@chromium.org
6 years, 7 months ago (2014-05-24 17:07:44 UTC) #28
darin (slow to review)
The CQ bit was checked by darin@chromium.org
6 years, 6 months ago (2014-06-13 06:17:56 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/darin@chromium.org/281353005/320001
6 years, 6 months ago (2014-06-13 06:20:19 UTC) #30
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 ...
6 years, 6 months ago (2014-06-13 08:23:07 UTC) #31
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-06-13 09:38:44 UTC) #32
commit-bot: I haz the power
Try jobs failed on following builders: android_dbg_triggered_tests on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/android_dbg_triggered_tests/builds/162263)
6 years, 6 months ago (2014-06-13 09:38:45 UTC) #33
qsr
https://codereview.chromium.org/281353005/diff/320001/mojo/android/javatests/mojo_test_case.cc File mojo/android/javatests/mojo_test_case.cc (left): https://codereview.chromium.org/281353005/diff/320001/mojo/android/javatests/mojo_test_case.cc#oldcode20 mojo/android/javatests/mojo_test_case.cc:20: mojo::Environment environment; Any reason not to put a shadow ...
6 years, 6 months ago (2014-06-13 09:53:04 UTC) #34
darin (slow to review)
On 2014/06/13 09:53:04, qsr wrote: > https://codereview.chromium.org/281353005/diff/320001/mojo/android/javatests/mojo_test_case.cc > File mojo/android/javatests/mojo_test_case.cc (left): > > https://codereview.chromium.org/281353005/diff/320001/mojo/android/javatests/mojo_test_case.cc#oldcode20 > ...
6 years, 6 months ago (2014-06-13 20:08:15 UTC) #35
darin (slow to review)
https://codereview.chromium.org/281353005/diff/320001/mojo/android/javatests/mojo_test_case.cc File mojo/android/javatests/mojo_test_case.cc (left): https://codereview.chromium.org/281353005/diff/320001/mojo/android/javatests/mojo_test_case.cc#oldcode20 mojo/android/javatests/mojo_test_case.cc:20: mojo::Environment environment; On 2014/06/13 09:53:04, qsr wrote: > Any ...
6 years, 6 months ago (2014-06-13 23:43:16 UTC) #36
darin (slow to review)
The CQ bit was checked by darin@chromium.org
6 years, 6 months ago (2014-06-13 23:49:53 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/darin@chromium.org/281353005/340001
6 years, 6 months ago (2014-06-13 23:50:55 UTC) #38
darin (slow to review)
The CQ bit was checked by darin@chromium.org
6 years, 6 months ago (2014-06-14 03:15:15 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/darin@chromium.org/281353005/360001
6 years, 6 months ago (2014-06-14 03:16:55 UTC) #40
darin (slow to review)
The CQ bit was checked by darin@chromium.org
6 years, 6 months ago (2014-06-14 06:35:57 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/darin@chromium.org/281353005/380001
6 years, 6 months ago (2014-06-14 06:37:11 UTC) #42
commit-bot: I haz the power
6 years, 6 months ago (2014-06-14 20:18:32 UTC) #43
Message was sent while issue was closed.
Change committed as 277265

Powered by Google App Engine
This is Rietveld 408576698