| Index: chrome/browser/nacl_host/nacl_process_host.cc
|
| diff --git a/chrome/browser/nacl_host/nacl_process_host.cc b/chrome/browser/nacl_host/nacl_process_host.cc
|
| index ec8b3dd4caf2f299d6d2209503e4ea7b8fc2103f..659a1c83de40079aba63b822a097762aaadb882d 100644
|
| --- a/chrome/browser/nacl_host/nacl_process_host.cc
|
| +++ b/chrome/browser/nacl_host/nacl_process_host.cc
|
| @@ -168,7 +168,6 @@ NaClProcessHost::NaClProcessHost(const GURL& manifest_url,
|
| enable_debug_stub_(false),
|
| uses_irt_(uses_irt),
|
| off_the_record_(off_the_record),
|
| - enable_ipc_proxy_(false),
|
| ALLOW_THIS_IN_INITIALIZER_LIST(ipc_plugin_listener_(this)),
|
| render_view_id_(render_view_id) {
|
| process_.reset(content::BrowserChildProcessHost::Create(
|
| @@ -189,13 +188,6 @@ NaClProcessHost::NaClProcessHost(const GURL& manifest_url,
|
| }
|
| enable_debug_stub_ = CommandLine::ForCurrentProcess()->HasSwitch(
|
| switches::kEnableNaClDebug);
|
| -
|
| - enable_ipc_proxy_ = !CommandLine::ForCurrentProcess()->HasSwitch(
|
| - switches::kEnableNaClSRPCProxy);
|
| - // If render_view_id == 0 we do not need PPAPI, so we can skip
|
| - // PPAPI IPC proxy channel creation, etc.
|
| - if (!render_view_id_)
|
| - enable_ipc_proxy_ = false;
|
| }
|
|
|
| NaClProcessHost::~NaClProcessHost() {
|
| @@ -707,7 +699,8 @@ bool NaClProcessHost::StartNaClExecution() {
|
| params.enable_exception_handling = enable_exception_handling_;
|
| params.enable_debug_stub = enable_debug_stub_ &&
|
| NaClBrowser::GetInstance()->URLMatchesDebugPatterns(manifest_url_);
|
| - params.enable_ipc_proxy = enable_ipc_proxy_;
|
| + // Enable PPAPI proxy channel creation only for renderer processes.
|
| + params.enable_ipc_proxy = enable_ppapi_proxy();
|
| params.uses_irt = uses_irt_;
|
|
|
| const ChildProcessData& data = process_->GetData();
|
| @@ -766,7 +759,7 @@ bool NaClProcessHost::StartNaClExecution() {
|
| }
|
|
|
| bool NaClProcessHost::SendStart() {
|
| - if (!enable_ipc_proxy_) {
|
| + if (!enable_ppapi_proxy()) {
|
| if (!ReplyToRenderer(IPC::ChannelHandle()))
|
| return false;
|
| }
|
| @@ -778,7 +771,8 @@ bool NaClProcessHost::SendStart() {
|
| // listener.
|
| void NaClProcessHost::OnPpapiChannelCreated(
|
| const IPC::ChannelHandle& channel_handle) {
|
| - DCHECK(enable_ipc_proxy_);
|
| + // Only renderer processes should create a channel.
|
| + DCHECK(enable_ppapi_proxy());
|
| // If the proxy channel is null, this must be the initial NaCl-Browser IPC
|
| // channel.
|
| if (!ipc_proxy_channel_.get()) {
|
|
|