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

Unified Diff: chrome/browser/nacl_host/nacl_process_host.cc

Issue 13866034: Pepper: Add VLOG support for NaCl plugins. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/logging.cc ('k') | ppapi/ppapi_shared.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 f91bd4e66d25b3d82a7a85266342df9753ac8640..5cda1b6dab64400aff57c28d22f98684bf94fd83 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/socket/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>
@@ -833,13 +835,26 @@ 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 flag_whitelist[] = {switches::kV, switches::kVModule};
+ for (size_t i = 0; i < arraysize(flag_whitelist); ++i) {
+ std::string value = cmdline->GetSwitchValueASCII(flag_whitelist[i]);
+ if (!value.empty()) {
+ args.switch_names.push_back(flag_whitelist[i]);
+ args.switch_values.push_back(value);
+ }
+ }
+
// 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_) {
« no previous file with comments | « base/logging.cc ('k') | ppapi/ppapi_shared.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698