diff options
author | mikhal@chromium.org <mikhal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-05 17:58:44 +0000 |
---|---|---|
committer | mikhal@chromium.org <mikhal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-05 17:58:44 +0000 |
commit | 33c8d63633265768c2e1894adfc3b198f5d64f94 (patch) | |
tree | e8c1214f3dd52b222eb4f0eaa3e2e632bfdab0a5 /media/cast/cast_environment.cc | |
parent | b5a18ca0f19958c29a787fe52993b1513774a537 (diff) | |
download | chromium_src-33c8d63633265768c2e1894adfc3b198f5d64f94.zip chromium_src-33c8d63633265768c2e1894adfc3b198f5d64f94.tar.gz chromium_src-33c8d63633265768c2e1894adfc3b198f5d64f94.tar.bz2 |
Cast:Switching to SingleThreadTaskRunner
BUG= 337558
Review URL: https://codereview.chromium.org/151663002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@249044 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/cast/cast_environment.cc')
-rw-r--r-- | media/cast/cast_environment.cc | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/media/cast/cast_environment.cc b/media/cast/cast_environment.cc index 2284adb..8efd6e6 100644 --- a/media/cast/cast_environment.cc +++ b/media/cast/cast_environment.cc @@ -8,7 +8,7 @@ #include "base/location.h" #include "base/logging.h" -using base::TaskRunner; +using base::SingleThreadTaskRunner; namespace { @@ -23,12 +23,12 @@ namespace cast { CastEnvironment::CastEnvironment( scoped_ptr<base::TickClock> clock, - scoped_refptr<TaskRunner> main_thread_proxy, - scoped_refptr<TaskRunner> audio_encode_thread_proxy, - scoped_refptr<TaskRunner> audio_decode_thread_proxy, - scoped_refptr<TaskRunner> video_encode_thread_proxy, - scoped_refptr<TaskRunner> video_decode_thread_proxy, - scoped_refptr<TaskRunner> transport_thread_proxy, + scoped_refptr<SingleThreadTaskRunner> main_thread_proxy, + scoped_refptr<SingleThreadTaskRunner> audio_encode_thread_proxy, + scoped_refptr<SingleThreadTaskRunner> audio_decode_thread_proxy, + scoped_refptr<SingleThreadTaskRunner> video_encode_thread_proxy, + scoped_refptr<SingleThreadTaskRunner> video_decode_thread_proxy, + scoped_refptr<SingleThreadTaskRunner> transport_thread_proxy, const CastLoggingConfig& config) : clock_(clock.Pass()), main_thread_proxy_(main_thread_proxy), @@ -55,8 +55,8 @@ CastEnvironment::~CastEnvironment() { bool CastEnvironment::PostTask(ThreadId identifier, const tracked_objects::Location& from_here, const base::Closure& task) { - scoped_refptr<TaskRunner> task_runner = - GetMessageTaskRunnerForThread(identifier); + scoped_refptr<SingleThreadTaskRunner> task_runner = + GetMessageSingleThreadTaskRunnerForThread(identifier); return task_runner->PostTask(from_here, task); } @@ -65,13 +65,14 @@ bool CastEnvironment::PostDelayedTask(ThreadId identifier, const tracked_objects::Location& from_here, const base::Closure& task, base::TimeDelta delay) { - scoped_refptr<TaskRunner> task_runner = - GetMessageTaskRunnerForThread(identifier); + scoped_refptr<SingleThreadTaskRunner> task_runner = + GetMessageSingleThreadTaskRunnerForThread(identifier); return task_runner->PostDelayedTask(from_here, task, delay); } -scoped_refptr<TaskRunner> CastEnvironment::GetMessageTaskRunnerForThread( +scoped_refptr<SingleThreadTaskRunner> +CastEnvironment::GetMessageSingleThreadTaskRunnerForThread( ThreadId identifier) { switch (identifier) { case CastEnvironment::MAIN: |