Chromium Code Reviews| 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 dbb03e140edc59339ed9f561448ac23a8513c773..367b21d9ced7b5ad984cc3b07431bd9fc29f2c93 100644 |
| --- a/chrome/browser/nacl_host/nacl_process_host.cc |
| +++ b/chrome/browser/nacl_host/nacl_process_host.cc |
| @@ -7,6 +7,7 @@ |
| #include <string> |
| #include <vector> |
| +#include "base/base_switches.h" |
| #include "base/bind.h" |
| #include "base/command_line.h" |
| #include "base/message_loop.h" |
| @@ -48,6 +49,7 @@ |
| #include "net/base/net_util.h" |
| #include "net/base/tcp_listen_socket.h" |
| #include "ppapi/proxy/ppapi_messages.h" |
| +#include "ppapi/shared_impl/ppapi_nacl_channel_args.h" |
| #if defined(OS_POSIX) |
| #include <fcntl.h> |
| @@ -840,13 +842,28 @@ void NaClProcessHost::OnPpapiChannelCreated( |
| chrome_render_message_filter_->render_process_id(), |
| render_view_id_)); |
| + ppapi::PpapiNaClChannelArgs args; |
| + args.off_the_record = chrome_render_message_filter_->off_the_record(); |
| + args.permissions = permissions_; |
| + CommandLine* cmdline = CommandLine::ForCurrentProcess(); |
| + DCHECK(cmdline); |
| + std::string v_flag = cmdline->GetSwitchValueASCII(switches::kV); |
|
dmichael (off chromium)
2013/04/10 23:10:22
Is it worth doing:
std::string flagWhitelist[] = [
|
| + if (!v_flag.empty()) { |
| + args.switch_names.push_back(switches::kV); |
| + args.switch_values.push_back(v_flag); |
| + } |
| + std::string vmodule_flag = cmdline->GetSwitchValueASCII(switches::kVModule); |
| + if (!vmodule_flag.empty()) { |
| + args.switch_names.push_back(switches::kVModule); |
| + args.switch_values.push_back(vmodule_flag); |
| + } |
| + |
| // Send a message to create the NaCl-Renderer channel. The handle is just |
| // a place holder. |
| ipc_proxy_channel_->Send( |
| new PpapiMsg_CreateNaClChannel( |
| chrome_render_message_filter_->render_process_id(), |
| - permissions_, |
| - chrome_render_message_filter_->off_the_record(), |
| + args, |
| SerializedHandle(SerializedHandle::CHANNEL_HANDLE, |
| IPC::InvalidPlatformFileForTransit()))); |
| } else if (reply_msg_) { |