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

Unified Diff: content/browser/gamepad/gamepad_provider.cc

Issue 2105173004: Remove calls to MessageLoop::current() in content. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
Index: content/browser/gamepad/gamepad_provider.cc
diff --git a/content/browser/gamepad/gamepad_provider.cc b/content/browser/gamepad/gamepad_provider.cc
index 5f196b11ecafe656fd6ff0c154cafe72f3b85421..fb45eaef2f573ca6592c313b8aad3d863568b29f 100644
--- a/content/browser/gamepad/gamepad_provider.cc
+++ b/content/browser/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);
}
@@ -208,7 +208,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;
@@ -260,7 +260,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/browser/download/drag_download_file.cc ('k') | content/browser/geolocation/geolocation_provider_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698