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

Issue 1174073002: C++ bindings: support using a callback as connection error handler. (Closed)

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

Description

C++ bindings: support using a callback as connection error handler. R=qsr@chromium.org Committed: https://chromium.googlesource.com/external/mojo/+/b39682ef66710fb9842540708f64f9a5c4564a24

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+71 lines, -79 lines) Patch
M mojo/public/cpp/bindings/binding.h View 7 chunks +16 lines, -11 lines 2 comments Download
M mojo/public/cpp/bindings/interface_ptr.h View 3 chunks +11 lines, -2 lines 0 comments Download
M mojo/public/cpp/bindings/lib/connector.h View 3 chunks +4 lines, -3 lines 0 comments Download
M mojo/public/cpp/bindings/lib/connector.cc View 2 chunks +2 lines, -4 lines 0 comments Download
M mojo/public/cpp/bindings/lib/interface_ptr_internal.h View 2 chunks +3 lines, -2 lines 0 comments Download
M mojo/public/cpp/bindings/lib/router.h View 2 chunks +3 lines, -2 lines 0 comments Download
M mojo/public/cpp/bindings/strong_binding.h View 4 chunks +15 lines, -9 lines 0 comments Download
M mojo/public/cpp/bindings/tests/binding_unittest.cc View 2 chunks +5 lines, -18 lines 0 comments Download
M mojo/public/cpp/bindings/tests/interface_ptr_unittest.cc View 10 chunks +12 lines, -28 lines 0 comments Download

Messages

Total messages: 9 (3 generated)
yzshen1
Hi, Benjamin. Would you please take a look? Thanks!
5 years, 6 months ago (2015-06-10 17:00:14 UTC) #2
qsr
LGTM with nits. https://codereview.chromium.org/1174073002/diff/1/mojo/public/cpp/bindings/binding.h File mojo/public/cpp/bindings/binding.h (right): https://codereview.chromium.org/1174073002/diff/1/mojo/public/cpp/bindings/binding.h#newcode125 mojo/public/cpp/bindings/binding.h:125: [this]() { connection_error_handler_.Run(); }); I'm missing ...
5 years, 6 months ago (2015-06-11 09:37:53 UTC) #3
yzshen1
https://codereview.chromium.org/1174073002/diff/1/mojo/public/cpp/bindings/binding.h File mojo/public/cpp/bindings/binding.h (right): https://codereview.chromium.org/1174073002/diff/1/mojo/public/cpp/bindings/binding.h#newcode125 mojo/public/cpp/bindings/binding.h:125: [this]() { connection_error_handler_.Run(); }); On 2015/06/11 09:37:53, qsr wrote: ...
5 years, 6 months ago (2015-06-11 16:51:45 UTC) #5
commit-bot: I haz the power
Commit queue rejected this change because it did not recognize the base URL. Please commit ...
5 years, 6 months ago (2015-06-11 16:55:04 UTC) #7
yzshen1
Committed patchset #1 (id:1) manually as b39682ef66710fb9842540708f64f9a5c4564a24 (presubmit successful).
5 years, 6 months ago (2015-06-11 16:58:22 UTC) #8
qsr
5 years, 6 months ago (2015-06-12 09:52:35 UTC) #9
Message was sent while issue was closed.
On 2015/06/11 16:51:45, yzshen1 wrote:
>
https://codereview.chromium.org/1174073002/diff/1/mojo/public/cpp/bindings/bi...
> File mojo/public/cpp/bindings/binding.h (right):
> 
>
https://codereview.chromium.org/1174073002/diff/1/mojo/public/cpp/bindings/bi...
> mojo/public/cpp/bindings/binding.h:125: [this]() {
> connection_error_handler_.Run(); });
> On 2015/06/11 09:37:53, qsr wrote:
> > I'm missing something. Why do you need to do this, why not just having
> > set_connection_error_handler delegate to the router?
> 
> The current code matches the previous behavior:
> * set_connection_error_handler() can be called at any time, before or after
> |internal_router_| is created;
> * the error handler is preserved after Close() and Unbind().
> 
> I understand that this is not consistent with what we do with InterfacePtr.
But
> I think it is beyond the scope of this CL to try to unify their behavior.
> 
> What do you think? Thanks!

I think we should unify all of this, but I agree this was not the right CL.

Powered by Google App Engine
This is Rietveld 408576698