summaryrefslogtreecommitdiff
path: root/media/cast/cast_environment.cc
diff options
context:
space:
mode:
authorTorne (Richard Coles) <torne@google.com>2013-11-28 11:55:43 +0000
committerTorne (Richard Coles) <torne@google.com>2013-11-28 11:55:43 +0000
commitf2477e01787aa58f445919b809d89e252beef54f (patch)
tree2db962b4af39f0db3a5f83b314373d0530c484b8 /media/cast/cast_environment.cc
parent7daea1dd5ff7e419322de831b642d81af3247912 (diff)
downloadchromium_org-f2477e01787aa58f445919b809d89e252beef54f.tar.gz
Merge from Chromium at DEPS revision 237746
This commit was generated by merge_to_master.py. Change-Id: I8997af4cddfeb09a7c26f7e8e672c712cab461ea
Diffstat (limited to 'media/cast/cast_environment.cc')
-rw-r--r--media/cast/cast_environment.cc18
1 files changed, 13 insertions, 5 deletions
diff --git a/media/cast/cast_environment.cc b/media/cast/cast_environment.cc
index dddec1649f..be636bb253 100644
--- a/media/cast/cast_environment.cc
+++ b/media/cast/cast_environment.cc
@@ -17,13 +17,15 @@ CastEnvironment::CastEnvironment(
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> video_decode_thread_proxy,
+ const CastLoggingConfig& config)
: clock_(clock),
main_thread_proxy_(main_thread_proxy),
audio_encode_thread_proxy_(audio_encode_thread_proxy),
audio_decode_thread_proxy_(audio_decode_thread_proxy),
video_encode_thread_proxy_(video_encode_thread_proxy),
- video_decode_thread_proxy_(video_decode_thread_proxy) {
+ video_decode_thread_proxy_(video_decode_thread_proxy),
+ logging_(new LoggingImpl(clock, main_thread_proxy, config)) {
DCHECK(main_thread_proxy) << "Main thread required";
}
@@ -62,7 +64,7 @@ scoped_refptr<TaskRunner> CastEnvironment::GetMessageTaskRunnerForThread(
case CastEnvironment::VIDEO_DECODER:
return video_decode_thread_proxy_;
default:
- NOTREACHED() << "Invalid Thread ID.";
+ NOTREACHED() << "Invalid Thread identifier";
return NULL;
}
}
@@ -80,14 +82,20 @@ bool CastEnvironment::CurrentlyOn(ThreadId identifier) {
case CastEnvironment::VIDEO_DECODER:
return video_decode_thread_proxy_->RunsTasksOnCurrentThread();
default:
- NOTREACHED() << "Wrong thread identifier";
+ NOTREACHED() << "Invalid thread identifier";
return false;
}
}
-base::TickClock* CastEnvironment::Clock() {
+base::TickClock* CastEnvironment::Clock() const {
return clock_;
}
+LoggingImpl* CastEnvironment::Logging() {
+ DCHECK(CurrentlyOn(CastEnvironment::MAIN)) <<
+ "Must be called from main thread";
+ return logging_.get();
+}
+
} // namespace cast
} // namespace media