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

Issue 5513001: Add a base class for objects that want to filter messages on the UI thread. ... (Closed)

Created:
10 years ago by jam
Modified:
9 years, 7 months ago
Reviewers:
Matt Perry
CC:
chromium-reviews, darin-cc_chromium.org, ben+cc_chromium.org, brettw-cc_chromium.org
Visibility:
Public.

Description

Add a base class for objects that want to filter messages on the IO thread. I'll switch the filters to it in future separate changes. I've also taken out the special case for an initial filter from the IPC classes. The reason it existed was that there was a race condition of some messages not being filtered if a filter is added after construction but before launching the peer process. Taking it out allows us to add more than one filter and makes things a little cleaner. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=68043

Patch Set 1 : '' #

Patch Set 2 : Fix possible race condition #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+186 lines, -65 lines) Patch
M chrome/browser/automation/automation_provider.cc View 1 chunk +1 line, -1 line 0 comments Download
A chrome/browser/browser_io_message_filter.h View 1 chunk +37 lines, -0 lines 0 comments Download
A chrome/browser/browser_io_message_filter.cc View 1 chunk +36 lines, -0 lines 0 comments Download
M chrome/browser/renderer_host/browser_render_process_host.h View 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/renderer_host/browser_render_process_host.cc View 4 chunks +20 lines, -16 lines 0 comments Download
M chrome/browser/service/service_process_control.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/chrome_browser.gypi View 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/common/child_thread.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/gpu/gpu_channel.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/plugin/plugin_channel_base.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/renderer/gpu_channel_host.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/service/service_ipc_server.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/automation/automation_proxy.cc View 1 chunk +1 line, -1 line 0 comments Download
M ipc/ipc_channel_proxy.h View 1 6 chunks +24 lines, -8 lines 0 comments Download
M ipc/ipc_channel_proxy.cc View 1 7 chunks +41 lines, -20 lines 2 comments Download
M ipc/ipc_sync_channel.h View 2 chunks +5 lines, -4 lines 0 comments Download
M ipc/ipc_sync_channel.cc View 2 chunks +7 lines, -6 lines 0 comments Download
M ipc/ipc_sync_channel_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M ipc/ipc_tests.cc View 1 chunk +1 line, -1 line 0 comments Download
M ppapi/proxy/dispatcher.cc View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 7 (0 generated)
jam
10 years ago (2010-12-01 23:34:10 UTC) #1
Matt Perry
LGTM, though BrowserIOMessageFilter looks unused. I guess it will be used in a future CL?
10 years ago (2010-12-02 01:15:22 UTC) #2
jam
On 2010/12/02 01:15:22, Matt Perry wrote: > LGTM, though BrowserIOMessageFilter looks unused. I guess it ...
10 years ago (2010-12-02 01:16:26 UTC) #3
jam
hey Matt, please have another look. My previous attempt at solving the race condition wasn't ...
10 years ago (2010-12-02 17:51:35 UTC) #4
Matt Perry
http://codereview.chromium.org/5513001/diff/22002/ipc/ipc_channel_proxy.cc File ipc/ipc_channel_proxy.cc (right): http://codereview.chromium.org/5513001/diff/22002/ipc/ipc_channel_proxy.cc#newcode317 ipc/ipc_channel_proxy.cc:317: context_.get(), &Context::OnChannelOpened)); Couldn't this cause OnChannelOpened to run, then ...
10 years ago (2010-12-02 19:00:39 UTC) #5
jam
http://codereview.chromium.org/5513001/diff/22002/ipc/ipc_channel_proxy.cc File ipc/ipc_channel_proxy.cc (right): http://codereview.chromium.org/5513001/diff/22002/ipc/ipc_channel_proxy.cc#newcode317 ipc/ipc_channel_proxy.cc:317: context_.get(), &Context::OnChannelOpened)); On 2010/12/02 19:00:39, Matt Perry wrote: > ...
10 years ago (2010-12-02 19:08:52 UTC) #6
Matt Perry
10 years ago (2010-12-02 19:14:51 UTC) #7
LGTM, per discussion in person (summary: if child process is launched after
AddFilter calls, we are guaranteed not to miss messages)

Powered by Google App Engine
This is Rietveld 408576698