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

Unified Diff: content/utility/utility_thread_impl.cc

Issue 987693005: Get rid of ChannelInit::SetSingleProcessIOTaskRunner() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Landing Created 5 years, 9 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 | « content/utility/utility_thread_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « content/utility/utility_thread_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698