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

Unified Diff: content/browser/media/capture/web_contents_video_capture_device_unittest.cc

Issue 1398153002: Don't use base::MessageLoop::{Quit,QuitClosure} in content/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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/media/capture/web_contents_video_capture_device_unittest.cc
diff --git a/content/browser/media/capture/web_contents_video_capture_device_unittest.cc b/content/browser/media/capture/web_contents_video_capture_device_unittest.cc
index 4f3fb0a325b84da1505857a55f6b7f87319ad9b5..22930e53f7eb9658b60e72e877cd2bd4a3801160 100644
--- a/content/browser/media/capture/web_contents_video_capture_device_unittest.cc
+++ b/content/browser/media/capture/web_contents_video_capture_device_unittest.cc
@@ -64,8 +64,10 @@ void DeadlineExceeded(base::Closure quit_closure) {
void RunCurrentLoopWithDeadline() {
base::Timer deadline(false, false);
- deadline.Start(FROM_HERE, TestTimeouts::action_max_timeout(), base::Bind(
- &DeadlineExceeded, base::MessageLoop::current()->QuitClosure()));
+ deadline.Start(
+ FROM_HERE, TestTimeouts::action_max_timeout(),
+ base::Bind(&DeadlineExceeded,
+ base::MessageLoop::current()->QuitWhenIdleClosure()));
base::MessageLoop::current()->Run();
deadline.Stop();
}
@@ -141,7 +143,7 @@ class CaptureTestSourceController {
void WaitForNextCopy() {
{
base::AutoLock guard(lock_);
- copy_done_ = base::MessageLoop::current()->QuitClosure();
+ copy_done_ = base::MessageLoop::current()->QuitWhenIdleClosure();
}
RunCurrentLoopWithDeadline();
@@ -472,11 +474,11 @@ class StubClientObserver {
void QuitIfConditionsMet(SkColor color, const gfx::Size& size) {
base::AutoLock guard(lock_);
if (error_encountered_)
- base::MessageLoop::current()->Quit();
+ base::MessageLoop::current()->QuitWhenIdle();
else if (wait_color_yuv_ == color && wait_size_.IsEmpty())
- base::MessageLoop::current()->Quit();
+ base::MessageLoop::current()->QuitWhenIdle();
else if (wait_color_yuv_ == color && wait_size_ == size)
- base::MessageLoop::current()->Quit();
+ base::MessageLoop::current()->QuitWhenIdle();
}
// Run the current loop until a frame is delivered with the |expected_color|

Powered by Google App Engine
This is Rietveld 408576698