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

Unified Diff: chromecast/media/cma/test/mock_frame_consumer.cc

Issue 1142513004: Chromecast: MessageLoopProxy cleanup --> SingleThreadTaskRunner. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 7 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: chromecast/media/cma/test/mock_frame_consumer.cc
diff --git a/chromecast/media/cma/test/mock_frame_consumer.cc b/chromecast/media/cma/test/mock_frame_consumer.cc
index 83a445a36d67539c773fd2a2feb41a9f2ab828a3..07335e66205733cbf1bd2efd5bd4d09c42e0c167 100644
--- a/chromecast/media/cma/test/mock_frame_consumer.cc
+++ b/chromecast/media/cma/test/mock_frame_consumer.cc
@@ -6,7 +6,8 @@
#include "base/bind.h"
#include "base/location.h"
-#include "base/message_loop/message_loop_proxy.h"
+#include "base/single_thread_task_runner.h"
+#include "base/thread_task_runner_handle.h"
#include "base/time/time.h"
#include "chromecast/media/cma/base/coded_frame_provider.h"
#include "chromecast/media/cma/base/decoder_buffer_base.h"
@@ -41,7 +42,7 @@ void MockFrameConsumer::Start(const base::Closure& done_cb) {
pattern_idx_ = 0;
- base::MessageLoopProxy::current()->PostTask(
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE,
base::Bind(&MockFrameConsumer::ReadFrame, base::Unretained(this)));
}
@@ -94,16 +95,14 @@ void MockFrameConsumer::OnNewFrame(
pattern_idx_ = (pattern_idx_ + 1) % delayed_task_pattern_.size();
if (delayed) {
- base::MessageLoopProxy::current()->PostDelayedTask(
+ base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
FROM_HERE,
- base::Bind(&MockFrameConsumer::ReadFrame,
- base::Unretained(this)),
+ base::Bind(&MockFrameConsumer::ReadFrame, base::Unretained(this)),
base::TimeDelta::FromMilliseconds(1));
} else {
- base::MessageLoopProxy::current()->PostTask(
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE,
- base::Bind(&MockFrameConsumer::ReadFrame,
- base::Unretained(this)));
+ base::Bind(&MockFrameConsumer::ReadFrame, base::Unretained(this)));
}
}
« no previous file with comments | « chromecast/media/cma/test/media_component_device_feeder_for_test.cc ('k') | chromecast/media/cma/test/mock_frame_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698