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

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

Issue 8787004: Make ChildProcessHost be used through an interface in content/public, instead of by inheritence. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years 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 | « chrome/browser/nacl_host/nacl_broker_host_win.cc ('k') | chrome/browser/service/service_process_control.cc » ('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
===================================================================
--- chrome/browser/nacl_host/nacl_process_host.cc (revision 112775)
+++ chrome/browser/nacl_host/nacl_process_host.cc (working copy)
@@ -12,6 +12,7 @@
#include "base/bind.h"
#include "base/command_line.h"
+#include "base/memory/singleton.h"
#include "base/path_service.h"
#include "base/stringprintf.h"
#include "base/utf_string_conversions.h"
@@ -23,7 +24,7 @@
#include "chrome/common/nacl_messages.h"
#include "chrome/common/render_messages.h"
#include "chrome/browser/renderer_host/chrome_render_message_filter.h"
-#include "content/common/child_process_host.h"
+#include "content/public/common/child_process_host.h"
#include "ipc/ipc_switches.h"
#include "native_client/src/shared/imc/nacl_imc.h"
@@ -34,6 +35,7 @@
#endif
using content::BrowserThread;
+using content::ChildProcessHost;
namespace {
@@ -228,7 +230,8 @@
}
bool NaClProcessHost::LaunchSelLdr() {
- if (!child_process_host()->CreateChannel())
+ std::string channel_id = child_process_host()->CreateChannel();
+ if (channel_id.empty())
return false;
CommandLine::StringType nacl_loader_prefix;
@@ -263,8 +266,7 @@
cmd_line->AppendSwitchASCII(switches::kProcessType,
switches::kNaClLoaderProcess);
- cmd_line->AppendSwitchASCII(switches::kProcessChannelID,
- child_process_host()->channel_id());
+ cmd_line->AppendSwitchASCII(switches::kProcessChannelID, channel_id);
if (logging::DialogsAreSuppressed())
cmd_line->AppendSwitch(switches::kNoErrorDialogs);
@@ -275,7 +277,7 @@
#if defined(OS_WIN)
if (RunningOnWOW64()) {
return NaClBrokerService::GetInstance()->LaunchLoader(
- this, ASCIIToWide(child_process_host()->channel_id()));
+ this, ASCIIToWide(channel_id));
} else {
BrowserChildProcessHost::Launch(FilePath(), cmd_line);
}
« no previous file with comments | « chrome/browser/nacl_host/nacl_broker_host_win.cc ('k') | chrome/browser/service/service_process_control.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698