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

Unified Diff: media/capture/video/file_video_capture_device.cc

Issue 2076423004: Remove calls to MessageLoop::current() in media. (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: media/capture/video/file_video_capture_device.cc
diff --git a/media/capture/video/file_video_capture_device.cc b/media/capture/video/file_video_capture_device.cc
index e4298066fdf4f3c2036d97c8b8bdf484d6f7f6fa..2fdcdbb17186ef4743faa65e2961e16c06c0af67 100644
--- a/media/capture/video/file_video_capture_device.cc
+++ b/media/capture/video/file_video_capture_device.cc
@@ -332,7 +332,7 @@ void FileVideoCaptureDevice::StopAndDeAllocate() {
void FileVideoCaptureDevice::OnAllocateAndStart(
const VideoCaptureParams& params,
std::unique_ptr<VideoCaptureDevice::Client> client) {
- DCHECK_EQ(capture_thread_.message_loop(), base::MessageLoop::current());
+ DCHECK(capture_thread_.task_runner()->BelongsToCurrentThread());
client_ = std::move(client);
@@ -352,14 +352,14 @@ void FileVideoCaptureDevice::OnAllocateAndStart(
}
void FileVideoCaptureDevice::OnStopAndDeAllocate() {
- DCHECK_EQ(capture_thread_.message_loop(), base::MessageLoop::current());
+ DCHECK(capture_thread_.task_runner()->BelongsToCurrentThread());
file_parser_.reset();
client_.reset();
next_frame_time_ = base::TimeTicks();
}
void FileVideoCaptureDevice::OnCaptureTask() {
- DCHECK_EQ(capture_thread_.message_loop(), base::MessageLoop::current());
+ DCHECK(capture_thread_.task_runner()->BelongsToCurrentThread());
if (!client_)
return;

Powered by Google App Engine
This is Rietveld 408576698