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

Unified Diff: components/mus/gpu/gpu_service_mus.cc

Issue 2087583002: Remove calls to MessageLoop::current() in components. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix test error Created 4 years, 6 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 | « components/mus/gpu/gpu_service_mus.h ('k') | components/nacl/loader/nacl_listener.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/gpu/gpu_service_mus.cc
diff --git a/components/mus/gpu/gpu_service_mus.cc b/components/mus/gpu/gpu_service_mus.cc
index 91eb1aed298d3077d8ce1962af272034ecb74276..f806c8aa39b9823d67c4bd9c3d162fb05d80308e 100644
--- a/components/mus/gpu/gpu_service_mus.cc
+++ b/components/mus/gpu/gpu_service_mus.cc
@@ -50,7 +50,7 @@ void EstablishGpuChannelDone(
GpuServiceMus::GpuServiceMus()
: next_client_id_(kLocalGpuChannelClientId),
- main_message_loop_(base::MessageLoop::current()),
+ main_task_runner_(base::ThreadTaskRunnerHandle::Get()),
shutdown_event_(base::WaitableEvent::ResetPolicy::MANUAL,
base::WaitableEvent::InitialState::NOT_SIGNALED),
gpu_thread_("GpuThread"),
@@ -260,7 +260,7 @@ void GpuServiceMus::EstablishGpuChannelOnGpuThread(
}
bool GpuServiceMus::IsMainThread() {
- return main_message_loop_ == base::MessageLoop::current();
+ return main_task_runner_->BelongsToCurrentThread();
}
scoped_refptr<base::SingleThreadTaskRunner>
« no previous file with comments | « components/mus/gpu/gpu_service_mus.h ('k') | components/nacl/loader/nacl_listener.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698