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

Issue 5874002: Create a ResourceMessageFilter to filter resource related IPCs. This gets ri... (Closed)

Created:
10 years ago by jam
Modified:
9 years, 7 months ago
Reviewers:
brettw
CC:
chromium-reviews, native-client-reviews_googlegroups.com, darin-cc_chromium.org, stuartmorgan+watch_chromium.org
Visibility:
Public.

Description

Create a ResourceMessageFilter to filter resource related IPCs. This gets rid of the awkward ResourceDispatcherHost::Receiver interface and allows a bunch of cleanup. I've also generalized the filtering done in WorkerProcessHost and moved it to ChildProcessHost (since it's now used to add the ResourceMessageFilter). Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=69335

Patch Set 1 : '' #

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Total comments: 14
Unified diffs Side-by-side diffs Delta from patch set Stats (+703 lines, -833 lines) Patch
M chrome/browser/browser_child_process_host.h View 6 chunks +26 lines, -13 lines 0 comments Download
M chrome/browser/browser_child_process_host.cc View 1 2 3 4 chunks +35 lines, -27 lines 0 comments Download
M chrome/browser/browser_message_filter.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/child_process_security_policy.h View 5 chunks +46 lines, -46 lines 0 comments Download
M chrome/browser/child_process_security_policy.cc View 10 chunks +53 lines, -53 lines 0 comments Download
M chrome/browser/chrome_plugin_host.cc View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/download/download_manager.cc View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/gpu_process_host.h View 1 chunk +0 lines, -5 lines 0 comments Download
M chrome/browser/gpu_process_host.cc View 1 chunk +0 lines, -6 lines 0 comments Download
M chrome/browser/memory_details_linux.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/nacl_host/nacl_broker_host_win.h View 2 chunks +0 lines, -7 lines 0 comments Download
M chrome/browser/nacl_host/nacl_broker_host_win.cc View 1 chunk +0 lines, -6 lines 0 comments Download
M chrome/browser/nacl_host/nacl_process_host.h View 1 chunk +0 lines, -5 lines 0 comments Download
M chrome/browser/nacl_host/nacl_process_host.cc View 3 chunks +2 lines, -8 lines 0 comments Download
M chrome/browser/plugin_process_host.h View 2 chunks +0 lines, -7 lines 0 comments Download
M chrome/browser/plugin_process_host.cc View 4 chunks +22 lines, -8 lines 2 comments Download
M chrome/browser/ppapi_plugin_process_host.h View 2 chunks +0 lines, -8 lines 0 comments Download
M chrome/browser/ppapi_plugin_process_host.cc View 4 chunks +5 lines, -13 lines 0 comments Download
M chrome/browser/profile_import_process_host.h View 2 chunks +0 lines, -4 lines 0 comments Download
M chrome/browser/profile_import_process_host.cc View 1 chunk +0 lines, -6 lines 0 comments Download
M chrome/browser/renderer_host/async_resource_handler.h View 2 chunks +4 lines, -8 lines 0 comments Download
M chrome/browser/renderer_host/async_resource_handler.cc View 10 chunks +25 lines, -27 lines 0 comments Download
M chrome/browser/renderer_host/browser_render_process_host.cc View 3 chunks +42 lines, -3 lines 4 comments Download
M chrome/browser/renderer_host/render_message_filter.h View 7 chunks +11 lines, -41 lines 0 comments Download
M chrome/browser/renderer_host/render_message_filter.cc View 1 28 chunks +54 lines, -107 lines 0 comments Download
M chrome/browser/renderer_host/render_message_filter_gtk.cc View 9 chunks +11 lines, -57 lines 0 comments Download
M chrome/browser/renderer_host/resource_dispatcher_host.h View 7 chunks +6 lines, -35 lines 0 comments Download
M chrome/browser/renderer_host/resource_dispatcher_host.cc View 15 chunks +37 lines, -91 lines 0 comments Download
M chrome/browser/renderer_host/resource_dispatcher_host_unittest.cc View 1 2 17 chunks +101 lines, -119 lines 4 comments Download
A chrome/browser/renderer_host/resource_message_filter.h View 1 chunk +70 lines, -0 lines 0 comments Download
A chrome/browser/renderer_host/resource_message_filter.cc View 1 chunk +54 lines, -0 lines 2 comments Download
M chrome/browser/renderer_host/safe_browsing_resource_handler.h View 2 chunks +4 lines, -3 lines 0 comments Download
M chrome/browser/renderer_host/safe_browsing_resource_handler.cc View 3 chunks +8 lines, -7 lines 0 comments Download
M chrome/browser/renderer_host/sync_resource_handler.h View 3 chunks +9 lines, -5 lines 0 comments Download
M chrome/browser/renderer_host/sync_resource_handler.cc View 5 chunks +8 lines, -9 lines 0 comments Download
M chrome/browser/ui/cocoa/preferences_window_controller.mm View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/utility_process_host.h View 2 chunks +0 lines, -4 lines 0 comments Download
M chrome/browser/utility_process_host.cc View 1 chunk +0 lines, -6 lines 0 comments Download
M chrome/browser/worker_host/worker_process_host.h View 3 chunks +0 lines, -14 lines 0 comments Download
M chrome/browser/worker_host/worker_process_host.cc View 5 chunks +7 lines, -36 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/common/child_process_host.h View 6 chunks +16 lines, -13 lines 2 comments Download
M chrome/common/child_process_host.cc View 6 chunks +38 lines, -18 lines 0 comments Download
M chrome/service/service_utility_process_host.h View 1 chunk +0 lines, -6 lines 0 comments Download
M chrome/service/service_utility_process_host.cc View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 3 (0 generated)
jam
10 years ago (2010-12-15 04:43:02 UTC) #1
brettw
LGTM, this is much nicer. http://codereview.chromium.org/5874002/diff/58002/chrome/browser/plugin_process_host.cc File chrome/browser/plugin_process_host.cc (right): http://codereview.chromium.org/5874002/diff/58002/chrome/browser/plugin_process_host.cc#newcode72 chrome/browser/plugin_process_host.cc:72: request_id); Indent 2 more ...
10 years ago (2010-12-15 21:31:10 UTC) #2
jam
10 years ago (2010-12-15 21:41:04 UTC) #3
http://codereview.chromium.org/5874002/diff/58002/chrome/browser/plugin_proce...
File chrome/browser/plugin_process_host.cc (right):

http://codereview.chromium.org/5874002/diff/58002/chrome/browser/plugin_proce...
chrome/browser/plugin_process_host.cc:72: request_id);
On 2010/12/15 21:31:10, brettw wrote:
> Indent 2 more spaces.

Done.

http://codereview.chromium.org/5874002/diff/58002/chrome/browser/renderer_hos...
File chrome/browser/renderer_host/browser_render_process_host.cc (right):

http://codereview.chromium.org/5874002/diff/58002/chrome/browser/renderer_hos...
chrome/browser/renderer_host/browser_render_process_host.cc:224: namespace {
On 2010/12/15 21:31:10, brettw wrote:
> Usually we'd put anonymous namespace first. In this case, it seems like most
of
> the stuff previously in this file can be in this anonymous namespace. Can you
> mess around with that?

I had tried that, but those classes are forward declared in the header and used
in scoped_ptrs, so it can't be done

http://codereview.chromium.org/5874002/diff/58002/chrome/browser/renderer_hos...
chrome/browser/renderer_host/browser_render_process_host.cc:232: :
request_context_(profile->GetRequestContext()),
On 2010/12/15 21:31:10, brettw wrote:
> 2 more spaces indent.

Done.

http://codereview.chromium.org/5874002/diff/58002/chrome/browser/renderer_hos...
File chrome/browser/renderer_host/resource_dispatcher_host_unittest.cc (right):

http://codereview.chromium.org/5874002/diff/58002/chrome/browser/renderer_hos...
chrome/browser/renderer_host/resource_dispatcher_host_unittest.cc:406: // the
host delegate acts as a second one so we can have some requests
On 2010/12/15 21:31:10, brettw wrote:
> Style nit: can you capitalize this?

Done.

http://codereview.chromium.org/5874002/diff/58002/chrome/browser/renderer_hos...
chrome/browser/renderer_host/resource_dispatcher_host_unittest.cc:412:
has_canceled_(false), received_after_canceled_(0) {
On 2010/12/15 21:31:10, brettw wrote:
> Style nit: can you move the last initializer to its own line?

Done.

http://codereview.chromium.org/5874002/diff/58002/chrome/browser/renderer_hos...
File chrome/browser/renderer_host/resource_message_filter.cc (right):

http://codereview.chromium.org/5874002/diff/58002/chrome/browser/renderer_hos...
chrome/browser/renderer_host/resource_message_filter.cc:32: bool
ResourceMessageFilter::OnMessageReceived(const IPC::Message& message,
On 2010/12/15 21:31:10, brettw wrote:
> Style nit: blank line above this.

Done.

http://codereview.chromium.org/5874002/diff/58002/chrome/common/child_process...
File chrome/common/child_process_host.h (right):

http://codereview.chromium.org/5874002/diff/58002/chrome/common/child_process...
chrome/common/child_process_host.h:67: void
AddFilter(IPC::ChannelProxy::MessageFilter* filter);
On 2010/12/15 21:31:10, brettw wrote:
> Can you make explicit that this takes a reference to the given filter?

Done.

Powered by Google App Engine
This is Rietveld 408576698