Index: content/browser/utility_process_host.cc |
=================================================================== |
--- content/browser/utility_process_host.cc (revision 118420) |
+++ content/browser/utility_process_host.cc (working copy) |
@@ -9,6 +9,7 @@ |
#include "base/command_line.h" |
#include "base/message_loop.h" |
#include "base/utf_string_conversions.h" |
+#include "content/browser/browser_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" |
@@ -36,8 +37,7 @@ |
UtilityProcessHost::UtilityProcessHost(Client* client, |
BrowserThread::ID client_thread_id) |
- : BrowserChildProcessHost(content::PROCESS_TYPE_UTILITY), |
- client_(client), |
+ : client_(client), |
client_thread_id_(client_thread_id), |
is_batch_mode_(false), |
no_sandbox_(false), |
@@ -48,6 +48,8 @@ |
#endif |
use_linux_zygote_(false), |
started_(false) { |
+ process_.reset(new BrowserChildProcessHost( |
+ content::PROCESS_TYPE_UTILITY, this)); |
} |
UtilityProcessHost::~UtilityProcessHost() { |
@@ -58,7 +60,7 @@ |
if (!StartProcess()) |
return false; |
- return BrowserChildProcessHost::Send(message); |
+ return process_->Send(message); |
} |
bool UtilityProcessHost::StartBatchMode() { |
@@ -87,9 +89,9 @@ |
return true; |
// Name must be set or metrics_service will crash in any test which |
// launches a UtilityProcessHost. |
- SetName(ASCIIToUTF16("utility process")); |
+ process_->SetName(ASCIIToUTF16("utility process")); |
- std::string channel_id = child_process_host()->CreateChannel(); |
+ std::string channel_id = process_->GetHost()->CreateChannel(); |
if (channel_id.empty()) |
return false; |
@@ -136,7 +138,7 @@ |
use_zygote = !no_sandbox_ && use_linux_zygote_; |
#endif |
- Launch( |
+ process_->Launch( |
#if defined(OS_WIN) |
exposed_dir_, |
#elif defined(OS_POSIX) |