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

Unified Diff: device/gamepad/gamepad_provider.cc

Issue 2123653003: Remove calls to MessageLoop::current() in content. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 5 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/renderer/render_thread_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/gamepad/gamepad_provider.cc
diff --git a/device/gamepad/gamepad_provider.cc b/device/gamepad/gamepad_provider.cc
index dded2673f8ce9de6d318d732cf14cee696b2ddde..c37c38a7dbc78ccaca92b5df5c3fa2ccfbbc87b0 100644
--- a/device/gamepad/gamepad_provider.cc
+++ b/device/gamepad/gamepad_provider.cc
@@ -159,7 +159,7 @@ void GamepadProvider::Initialize(std::unique_ptr<GamepadDataFetcher> fetcher) {
void GamepadProvider::DoInitializePollingThread(
std::unique_ptr<GamepadDataFetcher> fetcher) {
- DCHECK(base::MessageLoop::current() == polling_thread_->message_loop());
+ DCHECK(polling_thread_->task_runner()->BelongsToCurrentThread());
DCHECK(!data_fetcher_.get()); // Should only initialize once.
if (!fetcher)
@@ -168,7 +168,7 @@ void GamepadProvider::DoInitializePollingThread(
}
void GamepadProvider::SendPauseHint(bool paused) {
- DCHECK(base::MessageLoop::current() == polling_thread_->message_loop());
+ DCHECK(polling_thread_->task_runner()->BelongsToCurrentThread());
if (data_fetcher_)
data_fetcher_->PauseHint(paused);
}
@@ -207,7 +207,7 @@ void GamepadProvider::PadState::AsWebGamepad(WebGamepad* pad) {
}
void GamepadProvider::DoPoll() {
- DCHECK(base::MessageLoop::current() == polling_thread_->message_loop());
+ DCHECK(polling_thread_->task_runner()->BelongsToCurrentThread());
DCHECK(have_scheduled_do_poll_);
have_scheduled_do_poll_ = false;
@@ -256,7 +256,7 @@ void GamepadProvider::DoPoll() {
}
void GamepadProvider::ScheduleDoPoll() {
- DCHECK(base::MessageLoop::current() == polling_thread_->message_loop());
+ DCHECK(polling_thread_->task_runner()->BelongsToCurrentThread());
if (have_scheduled_do_poll_)
return;
« no previous file with comments | « content/renderer/render_thread_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698