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

Unified Diff: media/cast/cast_environment.cc

Issue 69603002: Incorporating logging into Cast (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Adding scoped_ptr include Created 7 years, 1 month 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 | « media/cast/cast_environment.h ('k') | media/cast/cast_sender_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/cast_environment.cc
diff --git a/media/cast/cast_environment.cc b/media/cast/cast_environment.cc
index dddec1649f57ec3972f6ee54f31128a4367c4eba..be636bb253d4c550880878a5de70c97bd0ac2f69 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
« no previous file with comments | « media/cast/cast_environment.h ('k') | media/cast/cast_sender_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698