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

Unified Diff: chromecast/renderer/media/audio_pipeline_proxy.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/renderer/media/audio_pipeline_proxy.cc
diff --git a/chromecast/renderer/media/audio_pipeline_proxy.cc b/chromecast/renderer/media/audio_pipeline_proxy.cc
index 30297a8a549b2c1c696653b563cc444b57745b94..0193232d6f2e852e17ce7cbf8a448e5ea9ffffc5 100644
--- a/chromecast/renderer/media/audio_pipeline_proxy.cc
+++ b/chromecast/renderer/media/audio_pipeline_proxy.cc
@@ -195,22 +195,20 @@ void AudioPipelineProxyInternal::OnStateChanged(
base::ResetAndReturn(&status_cb_).Run(status);
}
-
-// A macro runs current member function on |io_message_loop_proxy_| thread.
-#define FORWARD_ON_IO_THREAD(param_fn, ...) \
- io_message_loop_proxy_->PostTask( \
- FROM_HERE, \
- base::Bind(&AudioPipelineProxyInternal::param_fn, \
- base::Unretained(proxy_.get()), ##__VA_ARGS__))
+// A macro runs current member function on |io_task_runner_| thread.
+#define FORWARD_ON_IO_THREAD(param_fn, ...) \
+ io_task_runner_->PostTask( \
+ FROM_HERE, base::Bind(&AudioPipelineProxyInternal::param_fn, \
+ base::Unretained(proxy_.get()), ##__VA_ARGS__))
AudioPipelineProxy::AudioPipelineProxy(
- scoped_refptr<base::MessageLoopProxy> io_message_loop_proxy,
+ scoped_refptr<base::SingleThreadTaskRunner> io_task_runner,
scoped_refptr<MediaChannelProxy> media_channel_proxy)
- : io_message_loop_proxy_(io_message_loop_proxy),
+ : io_task_runner_(io_task_runner),
proxy_(new AudioPipelineProxyInternal(media_channel_proxy)),
audio_streamer_(new AvStreamerProxy()),
weak_factory_(this) {
- DCHECK(io_message_loop_proxy_.get());
+ DCHECK(io_task_runner_.get());
weak_this_ = weak_factory_.GetWeakPtr();
thread_checker_.DetachFromThread();
}
@@ -218,7 +216,7 @@ AudioPipelineProxy::AudioPipelineProxy(
AudioPipelineProxy::~AudioPipelineProxy() {
DCHECK(thread_checker_.CalledOnValidThread());
// Release the underlying object on the right thread.
- io_message_loop_proxy_->PostTask(
+ io_task_runner_->PostTask(
FROM_HERE,
base::Bind(&AudioPipelineProxyInternal::Release, base::Passed(&proxy_)));
}
« no previous file with comments | « chromecast/renderer/media/audio_pipeline_proxy.h ('k') | chromecast/renderer/media/cma_message_filter_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698