| Index: content/utility/utility_thread_impl.cc
|
| diff --git a/content/utility/utility_thread_impl.cc b/content/utility/utility_thread_impl.cc
|
| index a22005e897a0d486ab8d53fe832014ff2605f16f..7ea1a1d409b7207dee3f47f4be13d0edfcd9e520 100644
|
| --- a/content/utility/utility_thread_impl.cc
|
| +++ b/content/utility/utility_thread_impl.cc
|
| @@ -35,16 +35,15 @@ void ConvertVector(const SRC& src, DEST* dest) {
|
|
|
| } // namespace
|
|
|
| -UtilityThreadImpl::UtilityThreadImpl() : single_process_(false) {
|
| +UtilityThreadImpl::UtilityThreadImpl()
|
| + : ChildThreadImpl(ChildThreadImpl::Options::Builder().Build()) {
|
| Init();
|
| }
|
|
|
| -UtilityThreadImpl::UtilityThreadImpl(const std::string& channel_name)
|
| - : ChildThreadImpl(Options::Builder()
|
| - .InBrowserProcess(true)
|
| - .WithChannelName(channel_name)
|
| - .Build()),
|
| - single_process_(true) {
|
| +UtilityThreadImpl::UtilityThreadImpl(const InProcessChildThreadParams& params)
|
| + : ChildThreadImpl(ChildThreadImpl::Options::Builder()
|
| + .InBrowserProcess(params)
|
| + .Build()) {
|
| Init();
|
| }
|
|
|
| @@ -54,7 +53,7 @@ UtilityThreadImpl::~UtilityThreadImpl() {
|
| void UtilityThreadImpl::Shutdown() {
|
| ChildThreadImpl::Shutdown();
|
|
|
| - if (!single_process_)
|
| + if (!IsInBrowserProcess())
|
| blink::shutdown();
|
| }
|
|
|
| @@ -62,7 +61,7 @@ void UtilityThreadImpl::ReleaseProcessIfNeeded() {
|
| if (batch_mode_)
|
| return;
|
|
|
| - if (single_process_) {
|
| + if (IsInBrowserProcess()) {
|
| // Close the channel to cause UtilityProcessHostImpl to be deleted. We need
|
| // to take a different code path than the multi-process case because that
|
| // depends on the child process going away to close the channel, but that
|
| @@ -76,7 +75,7 @@ void UtilityThreadImpl::ReleaseProcessIfNeeded() {
|
| void UtilityThreadImpl::Init() {
|
| batch_mode_ = false;
|
| ChildProcess::current()->AddRefProcess();
|
| - if (!single_process_) {
|
| + if (!IsInBrowserProcess()) {
|
| // We can only initialize WebKit on one thread, and in single process mode
|
| // we run the utility thread on separate thread. This means that if any code
|
| // needs WebKit initialized in the utility process, they need to have
|
|
|