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

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: CR 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 | « media/base/test_helpers.cc ('k') | media/gpu/v4l2_image_processor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 9a40c50f4e8f4993d24455f294fbe2390ac1958c..10b3710f53fdf9775cda8682174c3ae5faf2aa84 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;
« no previous file with comments | « media/base/test_helpers.cc ('k') | media/gpu/v4l2_image_processor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698