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

Unified Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 140843007: Implement browser-side logging to WebRtc log (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 11 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: content/browser/renderer_host/render_process_host_impl.cc
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index 317f979b5e832f404e5e2819a7f67d8231c3f5fc..b8fd330176aec086227fd860148883a689b8c233 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -1520,6 +1520,21 @@ void RenderProcessHostImpl::DisableAecDump() {
base::Bind(&RenderProcessHostImpl::SendDisableAecDumpToRenderer,
weak_factory_.GetWeakPtr()));
}
+
+void RenderProcessHostImpl::SetWebRtcLogMessageCallback(
+ base::Callback<void(const std::string&)> callback) {
+ DCHECK(webrtc_log_message_callback_.is_null());
+ webrtc_log_message_callback_ = callback;
+}
+
+void RenderProcessHostImpl::WebRtcLogMessage(const std::string& message) {
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ if (!webrtc_log_message_callback_.is_null()) {
+ BrowserThread::PostTask(BrowserThread::IO,
+ FROM_HERE,
+ base::Bind(webrtc_log_message_callback_, message));
jam 2014/01/17 05:47:44 how do we guarantee that the callback is valid on
vrk (LEFT CHROMIUM) 2014/01/22 02:25:42 OK, yeah that makes sense. Moved the thread hop to
+ };
+}
#endif
IPC::ChannelProxy* RenderProcessHostImpl::GetChannel() {

Powered by Google App Engine
This is Rietveld 408576698