summaryrefslogtreecommitdiffstats
path: root/content/browser/utility_process_host.cc
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-03 07:10:44 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-03 07:10:44 +0000
commit4734d0becafa5b77d708020eed24d97148ea208d (patch)
treedb94ca97a1ac3f1831033ef07dbda98ccb53dfa6 /content/browser/utility_process_host.cc
parent463ea5fc399e6275a2351df6b398b7d91b8f5a61 (diff)
downloadchromium_src-4734d0becafa5b77d708020eed24d97148ea208d.zip
chromium_src-4734d0becafa5b77d708020eed24d97148ea208d.tar.gz
chromium_src-4734d0becafa5b77d708020eed24d97148ea208d.tar.bz2
Make ChildProcessHost be used through an interface in content/public, instead of by inheritence.
BUG=98716 Review URL: http://codereview.chromium.org/8787004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112878 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/utility_process_host.cc')
-rw-r--r--content/browser/utility_process_host.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/content/browser/utility_process_host.cc b/content/browser/utility_process_host.cc
index 8bc2234..998f8a5 100644
--- a/content/browser/utility_process_host.cc
+++ b/content/browser/utility_process_host.cc
@@ -9,7 +9,7 @@
#include "base/command_line.h"
#include "base/message_loop.h"
#include "base/utf_string_conversions.h"
-#include "content/common/child_process_host.h"
+#include "content/common/child_process_host_impl.h"
#include "content/common/utility_messages.h"
#include "content/public/browser/content_browser_client.h"
#include "content/public/common/content_switches.h"
@@ -18,6 +18,7 @@
#include "webkit/plugins/plugin_switches.h"
using content::BrowserThread;
+using content::ChildProcessHost;
UtilityProcessHost::Client::Client() {
}
@@ -87,7 +88,8 @@ bool UtilityProcessHost::StartProcess() {
// launches a UtilityProcessHost.
set_name(ASCIIToUTF16("utility process"));
- if (!child_process_host()->CreateChannel())
+ std::string channel_id = child_process_host()->CreateChannel();
+ if (channel_id.empty())
return false;
FilePath exe_path = GetUtilityProcessCmd();
@@ -99,8 +101,7 @@ bool UtilityProcessHost::StartProcess() {
CommandLine* cmd_line = new CommandLine(exe_path);
cmd_line->AppendSwitchASCII(switches::kProcessType,
switches::kUtilityProcess);
- cmd_line->AppendSwitchASCII(switches::kProcessChannelID,
- child_process_host()->channel_id());
+ cmd_line->AppendSwitchASCII(switches::kProcessChannelID, channel_id);
std::string locale =
content::GetContentClient()->browser()->GetApplicationLocale();
cmd_line->AppendSwitchASCII(switches::kLang, locale);