summaryrefslogtreecommitdiffstats
path: root/chrome/browser/nacl_host
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-15 22:19:48 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-15 22:19:48 +0000
commit8e2b6472071f38c065a3d00adb136ef259ef68a1 (patch)
tree8a05864f6463e4948c6468139998a59eb6b54899 /chrome/browser/nacl_host
parent10a4a0aa5e9a1754752454ee2d4d8aff872a61a3 (diff)
downloadchromium_src-8e2b6472071f38c065a3d00adb136ef259ef68a1.zip
chromium_src-8e2b6472071f38c065a3d00adb136ef259ef68a1.tar.gz
chromium_src-8e2b6472071f38c065a3d00adb136ef259ef68a1.tar.bz2
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).
Review URL: http://codereview.chromium.org/5874002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69335 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/nacl_host')
-rw-r--r--chrome/browser/nacl_host/nacl_broker_host_win.cc6
-rw-r--r--chrome/browser/nacl_host/nacl_broker_host_win.h7
-rw-r--r--chrome/browser/nacl_host/nacl_process_host.cc10
-rw-r--r--chrome/browser/nacl_host/nacl_process_host.h5
4 files changed, 2 insertions, 26 deletions
diff --git a/chrome/browser/nacl_host/nacl_broker_host_win.cc b/chrome/browser/nacl_host/nacl_broker_host_win.cc
index 717ba49..0942a23 100644
--- a/chrome/browser/nacl_host/nacl_broker_host_win.cc
+++ b/chrome/browser/nacl_host/nacl_broker_host_win.cc
@@ -23,12 +23,6 @@ NaClBrokerHost::NaClBrokerHost(
NaClBrokerHost::~NaClBrokerHost() {
}
-URLRequestContext* NaClBrokerHost::GetRequestContext(
- uint32 request_id,
- const ViewHostMsg_Resource_Request& request_data) {
- return NULL;
-}
-
bool NaClBrokerHost::Init() {
// Create the channel that will be used for communicating with the broker.
if (!CreateChannel())
diff --git a/chrome/browser/nacl_host/nacl_broker_host_win.h b/chrome/browser/nacl_host/nacl_broker_host_win.h
index 9e07e3e..7213ff0 100644
--- a/chrome/browser/nacl_host/nacl_broker_host_win.h
+++ b/chrome/browser/nacl_host/nacl_broker_host_win.h
@@ -7,9 +7,7 @@
#pragma once
#include "base/basictypes.h"
-#include "base/process.h"
#include "chrome/browser/browser_child_process_host.h"
-#include "ipc/ipc_message.h"
class NaClBrokerHost : public BrowserChildProcessHost {
public:
@@ -28,11 +26,6 @@ class NaClBrokerHost : public BrowserChildProcessHost {
void StopBroker();
private:
- // ResourceDispatcherHost::Receiver implementation:
- virtual URLRequestContext* GetRequestContext(
- uint32 request_id,
- const ViewHostMsg_Resource_Request& request_data);
-
virtual bool CanShutdown() { return true; }
// Handler for NaClProcessMsg_LoaderLaunched message
diff --git a/chrome/browser/nacl_host/nacl_process_host.cc b/chrome/browser/nacl_host/nacl_process_host.cc
index aeb6a00..f9f5667 100644
--- a/chrome/browser/nacl_host/nacl_process_host.cc
+++ b/chrome/browser/nacl_host/nacl_process_host.cc
@@ -187,7 +187,7 @@ void NaClProcessHost::OnProcessLaunched() {
HANDLE handle_in_renderer;
DuplicateHandle(base::GetCurrentProcessHandle(),
reinterpret_cast<HANDLE>(sockets_for_renderer_[i]),
- render_message_filter_->handle(),
+ render_message_filter_->peer_handle(),
&handle_in_renderer,
GENERIC_READ | GENERIC_WRITE,
FALSE,
@@ -208,7 +208,7 @@ void NaClProcessHost::OnProcessLaunched() {
// Copy the process handle into the renderer process.
DuplicateHandle(base::GetCurrentProcessHandle(),
handle(),
- render_message_filter_->handle(),
+ render_message_filter_->peer_handle(),
&nacl_process_handle,
PROCESS_DUP_HANDLE,
FALSE,
@@ -286,12 +286,6 @@ void NaClProcessHost::OnMessageReceived(const IPC::Message& msg) {
NOTREACHED() << "Invalid message with type = " << msg.type();
}
-URLRequestContext* NaClProcessHost::GetRequestContext(
- uint32 request_id,
- const ViewHostMsg_Resource_Request& request_data) {
- return NULL;
-}
-
bool NaClProcessHost::CanShutdown() {
return true;
}
diff --git a/chrome/browser/nacl_host/nacl_process_host.h b/chrome/browser/nacl_host/nacl_process_host.h
index 86bd614..e2b0c39 100644
--- a/chrome/browser/nacl_host/nacl_process_host.h
+++ b/chrome/browser/nacl_host/nacl_process_host.h
@@ -47,11 +47,6 @@ class NaClProcessHost : public BrowserChildProcessHost {
virtual void OnProcessLaunched();
- // ResourceDispatcherHost::Receiver implementation:
- virtual URLRequestContext* GetRequestContext(
- uint32 request_id,
- const ViewHostMsg_Resource_Request& request_data);
-
virtual bool CanShutdown();
#if defined(OS_WIN)