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

Issue 1997473005: Remove requirement that mojo::Environment be instantiated. (Closed)

Created:
4 years, 7 months ago by viettrungluu
Modified:
4 years, 7 months ago
Reviewers:
vardhan
CC:
mojo-reviews_chromium.org, gregsimon, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, abarth-chromium, Aaron Boodman, darin (slow to review), ben+mojo_chromium.org, yzshen+mojopublicwatch_chromium.org
Base URL:
https://github.com/domokit/mojo.git@work797_no_utility_tls
Target Ref:
refs/heads/master
Project:
mojo
Visibility:
Public.

Description

Remove requirement that mojo::Environment be instantiated. In fact, make it not instantiatable. Arguably, the class should be removed and its static methods replaced with free functions. But I'll leave that for another day. R=vardhan@google.com Committed: https://chromium.googlesource.com/external/mojo/+/dc998703fec2d972e1d2f4b8736018310649553c

Patch Set 1 #

Patch Set 2 : rebased #

Total comments: 4

Patch Set 3 : SetDefaultAsyncWaiter #

Unified diffs Side-by-side diffs Delta from patch set Stats (+101 lines, -288 lines) Patch
M mojo/environment/environment.cc View 1 2 1 chunk +15 lines, -14 lines 0 comments Download
M mojo/public/cpp/application/lib/application_runner.cc View 2 chunks +0 lines, -2 lines 0 comments Download
M mojo/public/cpp/application/lib/application_test_main.cc View 1 chunk +0 lines, -4 lines 0 comments Download
M mojo/public/cpp/application/tests/service_provider_impl_unittest.cc View 2 chunks +0 lines, -2 lines 0 comments Download
M mojo/public/cpp/bindings/tests/array_unittest.cc View 24 chunks +24 lines, -33 lines 0 comments Download
M mojo/public/cpp/bindings/tests/binding_callback_unittest.cc View 2 chunks +0 lines, -2 lines 0 comments Download
M mojo/public/cpp/bindings/tests/binding_unittest.cc View 2 chunks +0 lines, -2 lines 0 comments Download
M mojo/public/cpp/bindings/tests/bindings_perftest.cc View 1 chunk +0 lines, -1 line 0 comments Download
M mojo/public/cpp/bindings/tests/connector_unittest.cc View 2 chunks +0 lines, -2 lines 0 comments Download
M mojo/public/cpp/bindings/tests/equals_unittest.cc View 6 chunks +6 lines, -14 lines 0 comments Download
M mojo/public/cpp/bindings/tests/handle_passing_unittest.cc View 2 chunks +0 lines, -2 lines 0 comments Download
M mojo/public/cpp/bindings/tests/interface_ptr_unittest.cc View 4 chunks +0 lines, -4 lines 0 comments Download
M mojo/public/cpp/bindings/tests/map_unittest.cc View 17 chunks +16 lines, -25 lines 0 comments Download
M mojo/public/cpp/bindings/tests/request_response_unittest.cc View 2 chunks +0 lines, -2 lines 0 comments Download
M mojo/public/cpp/bindings/tests/router_unittest.cc View 2 chunks +0 lines, -2 lines 0 comments Download
M mojo/public/cpp/bindings/tests/sample_service_unittest.cc View 3 chunks +2 lines, -14 lines 0 comments Download
M mojo/public/cpp/bindings/tests/serialization_api_unittest.cc View 1 chunk +0 lines, -3 lines 0 comments Download
M mojo/public/cpp/bindings/tests/serialization_warning_unittest.cc View 2 chunks +0 lines, -3 lines 0 comments Download
M mojo/public/cpp/bindings/tests/struct_unittest.cc View 11 chunks +10 lines, -19 lines 0 comments Download
M mojo/public/cpp/bindings/tests/synchronous_connector_unittest.cc View 2 chunks +0 lines, -2 lines 0 comments Download
M mojo/public/cpp/bindings/tests/synchronous_interface_ptr_unittest.cc View 2 chunks +0 lines, -2 lines 0 comments Download
M mojo/public/cpp/bindings/tests/union_unittest.cc View 39 chunks +0 lines, -42 lines 0 comments Download
M mojo/public/cpp/bindings/tests/validation_unittest.cc View 9 chunks +8 lines, -17 lines 0 comments Download
M mojo/public/cpp/environment/environment.h View 1 2 2 chunks +10 lines, -17 lines 0 comments Download
M mojo/public/cpp/environment/lib/environment.cc View 1 2 1 chunk +8 lines, -34 lines 0 comments Download
M mojo/public/cpp/environment/lib/logging_only_environment.cc View 1 chunk +0 lines, -7 lines 0 comments Download
M mojo/public/cpp/environment/tests/async_wait_unittest.cc View 1 chunk +0 lines, -1 line 0 comments Download
M mojo/public/cpp/environment/tests/async_waiter_unittest.cc View 1 chunk +0 lines, -1 line 0 comments Download
M mojo/public/cpp/environment/tests/logger_unittest.cc View 4 chunks +0 lines, -4 lines 0 comments Download
M mojo/public/cpp/environment/tests/logging_unittest.cc View 2 chunks +2 lines, -3 lines 0 comments Download
M mojo/public/python/c_environment.pxd View 1 chunk +0 lines, -5 lines 0 comments Download
M mojo/public/python/mojo_system_impl.pyx View 1 chunk +0 lines, -3 lines 0 comments Download

Messages

Total messages: 5 (1 generated)
viettrungluu
4 years, 7 months ago (2016-05-19 21:58:46 UTC) #1
vardhan
lgtm with comments/questions https://codereview.chromium.org/1997473005/diff/20001/mojo/public/cpp/environment/environment.h File mojo/public/cpp/environment/environment.h (left): https://codereview.chromium.org/1997473005/diff/20001/mojo/public/cpp/environment/environment.h#oldcode28 mojo/public/cpp/environment/environment.h:28: Environment(const MojoAsyncWaiter* default_async_waiter, if the default ...
4 years, 7 months ago (2016-05-20 18:38:06 UTC) #2
viettrungluu
Committed patchset #3 (id:40001) manually as dc998703fec2d972e1d2f4b8736018310649553c (presubmit successful).
4 years, 7 months ago (2016-05-20 21:08:55 UTC) #4
viettrungluu
4 years, 7 months ago (2016-05-20 21:09:46 UTC) #5
Message was sent while issue was closed.
Thanks.

https://codereview.chromium.org/1997473005/diff/20001/mojo/public/cpp/environ...
File mojo/public/cpp/environment/environment.h (left):

https://codereview.chromium.org/1997473005/diff/20001/mojo/public/cpp/environ...
mojo/public/cpp/environment/environment.h:28: Environment(const MojoAsyncWaiter*
default_async_waiter,
On 2016/05/20 18:38:06, vardhan wrote:
> if the default async waiter or default logger do need to be initialized for
some
> reason, I guess we should now expect a GetDefaultLogger() to lazy-initialize?

Either that, or some implementations may require explicit initialization (as I
tried to explain in the comment I added).

https://codereview.chromium.org/1997473005/diff/20001/mojo/public/cpp/environ...
mojo/public/cpp/environment/environment.h:32: static const MojoAsyncWaiter*
GetDefaultAsyncWaiter();
On 2016/05/20 18:38:06, vardhan wrote:
> should we have a SetDefaultAsyncWaitier() as well?

Done.

Powered by Google App Engine
This is Rietveld 408576698