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

Issue 2276043002: Support custom message filtering on Mojo binding objects (Closed)

Created:
4 years, 3 months ago by Ken Rockot(use gerrit already)
Modified:
4 years, 3 months ago
Reviewers:
yzshen1
CC:
Aaron Boodman, abarth-chromium, chromium-reviews, darin (slow to review), darin-cc_chromium.org, jam, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Support custom message filtering on Mojo binding objects * Replaces MessageFilter with MessageReceiver * Updates FilterChain to always end on the sink, short-circuiting if any "filter" (receiver) rejects along the way * Adds a new AddFilter() interface to mojo::Binding and mojo::AssociatedBinding, allowing users to inject MessageReceiver filters to be run immediately before every message dispatch BUG=612500 R=yzshen@chromium.org TBR=tsepez@chromium.org Committed: https://crrev.com/222e7dd4cce2ad6e583e54638404aedf9126a956 Cr-Commit-Position: refs/heads/master@{#414197}

Patch Set 1 #

Patch Set 2 : . #

Patch Set 3 : rebase #

Patch Set 4 : . #

Total comments: 2

Patch Set 5 : comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+395 lines, -256 lines) Patch
M ipc/ipc_mojo_bootstrap.cc View 3 chunks +5 lines, -4 lines 0 comments Download
M mojo/public/cpp/bindings/BUILD.gn View 1 2 4 chunks +1 line, -3 lines 0 comments Download
M mojo/public/cpp/bindings/associated_binding.h View 1 2 3 4 2 chunks +10 lines, -0 lines 0 comments Download
M mojo/public/cpp/bindings/binding.h View 1 2 3 4 2 chunks +9 lines, -0 lines 0 comments Download
A + mojo/public/cpp/bindings/filter_chain.h View 3 chunks +11 lines, -19 lines 0 comments Download
M mojo/public/cpp/bindings/interface_endpoint_client.h View 4 chunks +7 lines, -3 lines 0 comments Download
M mojo/public/cpp/bindings/lib/binding_state.h View 6 chunks +10 lines, -8 lines 0 comments Download
M mojo/public/cpp/bindings/lib/binding_state.cc View 3 chunks +9 lines, -4 lines 0 comments Download
D mojo/public/cpp/bindings/lib/filter_chain.h View 1 chunk +0 lines, -66 lines 0 comments Download
M mojo/public/cpp/bindings/lib/filter_chain.cc View 2 chunks +8 lines, -16 lines 0 comments Download
M mojo/public/cpp/bindings/lib/interface_endpoint_client.cc View 1 2 4 chunks +9 lines, -5 lines 0 comments Download
M mojo/public/cpp/bindings/lib/interface_ptr_state.h View 1 chunk +1 line, -1 line 0 comments Download
M mojo/public/cpp/bindings/lib/message.cc View 1 chunk +6 lines, -0 lines 0 comments Download
D mojo/public/cpp/bindings/lib/message_filter.cc View 1 chunk +0 lines, -23 lines 0 comments Download
M mojo/public/cpp/bindings/lib/message_header_validator.cc View 2 chunks +5 lines, -6 lines 0 comments Download
M mojo/public/cpp/bindings/lib/multiplex_router.h View 2 chunks +5 lines, -1 line 0 comments Download
M mojo/public/cpp/bindings/lib/multiplex_router.cc View 3 chunks +9 lines, -3 lines 0 comments Download
M mojo/public/cpp/bindings/lib/router.h View 2 chunks +4 lines, -1 line 0 comments Download
M mojo/public/cpp/bindings/lib/router.cc View 1 2 1 chunk +5 lines, -1 line 0 comments Download
M mojo/public/cpp/bindings/message.h View 1 chunk +12 lines, -0 lines 0 comments Download
D mojo/public/cpp/bindings/message_filter.h View 1 chunk +0 lines, -38 lines 0 comments Download
M mojo/public/cpp/bindings/message_header_validator.h View 1 chunk +3 lines, -5 lines 0 comments Download
M mojo/public/cpp/bindings/no_interface.h View 1 chunk +0 lines, -1 line 0 comments Download
M mojo/public/cpp/bindings/strong_binding.h View 1 chunk +1 line, -1 line 0 comments Download
M mojo/public/cpp/bindings/tests/associated_interface_unittest.cc View 3 chunks +151 lines, -0 lines 0 comments Download
M mojo/public/cpp/bindings/tests/binding_unittest.cc View 2 chunks +75 lines, -0 lines 0 comments Download
M mojo/public/cpp/bindings/tests/multiplex_router_unittest.cc View 1 chunk +0 lines, -1 line 0 comments Download
M mojo/public/cpp/bindings/tests/router_unittest.cc View 6 chunks +12 lines, -12 lines 0 comments Download
M mojo/public/cpp/bindings/tests/validation_unittest.cc View 3 chunks +11 lines, -11 lines 0 comments Download
M mojo/public/interfaces/bindings/tests/BUILD.gn View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M mojo/public/interfaces/bindings/tests/test_associated_interfaces.mojom View 2 chunks +6 lines, -0 lines 0 comments Download
M mojo/public/tools/bindings/generators/cpp_templates/interface_definition.tmpl View 6 chunks +4 lines, -16 lines 0 comments Download
M mojo/public/tools/bindings/generators/cpp_templates/interface_request_validator_declaration.tmpl View 1 chunk +1 line, -3 lines 0 comments Download
M mojo/public/tools/bindings/generators/cpp_templates/interface_response_validator_declaration.tmpl View 1 chunk +1 line, -3 lines 0 comments Download
M mojo/public/tools/bindings/generators/cpp_templates/module.h.tmpl View 1 2 1 chunk +0 lines, -1 line 0 comments Download

Messages

Total messages: 31 (21 generated)
Ken Rockot(use gerrit already)
Please take a look. If we get rid of MessageFilter holding a sink reference, it's ...
4 years, 3 months ago (2016-08-24 16:51:49 UTC) #7
yzshen1
LGTM Thanks! https://codereview.chromium.org/2276043002/diff/60001/mojo/public/cpp/bindings/binding.h File mojo/public/cpp/bindings/binding.h (right): https://codereview.chromium.org/2276043002/diff/60001/mojo/public/cpp/bindings/binding.h#newcode157 mojo/public/cpp/bindings/binding.h:157: // optionally prevent it from being dispatched. ...
4 years, 3 months ago (2016-08-24 20:47:55 UTC) #14
Ken Rockot(use gerrit already)
https://codereview.chromium.org/2276043002/diff/60001/mojo/public/cpp/bindings/binding.h File mojo/public/cpp/bindings/binding.h (right): https://codereview.chromium.org/2276043002/diff/60001/mojo/public/cpp/bindings/binding.h#newcode157 mojo/public/cpp/bindings/binding.h:157: // optionally prevent it from being dispatched. Filters cannot ...
4 years, 3 months ago (2016-08-24 20:56:38 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2276043002/80001
4 years, 3 months ago (2016-08-24 20:57:02 UTC) #18
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/245285)
4 years, 3 months ago (2016-08-24 21:11:30 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2276043002/80001
4 years, 3 months ago (2016-08-24 21:27:15 UTC) #23
Ken Rockot(use gerrit already)
(TBR tsepez for test-only mojom)
4 years, 3 months ago (2016-08-24 23:28:17 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2276043002/80001
4 years, 3 months ago (2016-08-24 23:28:23 UTC) #28
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 3 months ago (2016-08-24 23:37:26 UTC) #29
commit-bot: I haz the power
4 years, 3 months ago (2016-08-24 23:39:53 UTC) #31
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/222e7dd4cce2ad6e583e54638404aedf9126a956
Cr-Commit-Position: refs/heads/master@{#414197}

Powered by Google App Engine
This is Rietveld 408576698