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

Unified Diff: chromecast/media/cma/test/mock_frame_provider.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
« no previous file with comments | « chromecast/media/cma/test/mock_frame_consumer.cc ('k') | chromecast/net/connectivity_checker.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromecast/media/cma/test/mock_frame_provider.cc
diff --git a/chromecast/media/cma/test/mock_frame_provider.cc b/chromecast/media/cma/test/mock_frame_provider.cc
index 1715b56fa654c1f7875ae69bdf4c30ade0e329f3..f9beb0444a58d9d2cec54bd3f61e97411bd5b610 100644
--- a/chromecast/media/cma/test/mock_frame_provider.cc
+++ b/chromecast/media/cma/test/mock_frame_provider.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/decoder_buffer_base.h"
#include "chromecast/media/cma/test/frame_generator_for_test.h"
@@ -40,16 +41,14 @@ void MockFrameProvider::Read(const ReadCB& read_cb) {
pattern_idx_ = (pattern_idx_ + 1) % delayed_task_pattern_.size();
if (delayed) {
- base::MessageLoopProxy::current()->PostDelayedTask(
+ base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
FROM_HERE,
- base::Bind(&MockFrameProvider::DoRead,
- base::Unretained(this), read_cb),
+ base::Bind(&MockFrameProvider::DoRead, base::Unretained(this), read_cb),
base::TimeDelta::FromMilliseconds(1));
} else {
- base::MessageLoopProxy::current()->PostTask(
- FROM_HERE,
- base::Bind(&MockFrameProvider::DoRead,
- base::Unretained(this), read_cb));
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
+ FROM_HERE, base::Bind(&MockFrameProvider::DoRead,
+ base::Unretained(this), read_cb));
}
}
« no previous file with comments | « chromecast/media/cma/test/mock_frame_consumer.cc ('k') | chromecast/net/connectivity_checker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698