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

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

Issue 264793017: Implements RTP header dumping. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix leak Created 6 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: 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 26039a4aa6850c6c5560edd45a16ebd55b4ef3be..1ef2c503570df2f592fb53be447591af04134e0a 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -807,9 +807,10 @@ void RenderProcessHostImpl::CreateMessageFilters() {
}
#if defined(ENABLE_WEBRTC)
- AddFilter(new P2PSocketDispatcherHost(
+ p2p_socket_dispatcher_host_ = new P2PSocketDispatcherHost(
resource_context,
- browser_context->GetRequestContextForRenderProcess(GetID())));
+ browser_context->GetRequestContextForRenderProcess(GetID()));
+ AddFilter(p2p_socket_dispatcher_host_);
#endif
AddFilter(new TraceMessageFilter());
@@ -1511,6 +1512,30 @@ void RenderProcessHostImpl::SetWebRtcLogMessageCallback(
base::Callback<void(const std::string&)> callback) {
webrtc_log_message_callback_ = callback;
}
+
+RenderProcessHostImpl::WebRtcStopRtpDumpCallback
+RenderProcessHostImpl::StartRtpDump(
+ bool incoming,
+ bool outgoing,
+ const WebRtcRtpPacketCallback& packet_callback) {
+ if (!p2p_socket_dispatcher_host_)
+ return WebRtcStopRtpDumpCallback();
+
+ BrowserThread::PostTask(BrowserThread::IO,
+ FROM_HERE,
+ base::Bind(&P2PSocketDispatcherHost::StartRtpDump,
+ p2p_socket_dispatcher_host_,
+ incoming,
+ outgoing,
+ packet_callback));
+
+ if (stop_rtp_dump_callback_.is_null()) {
+ stop_rtp_dump_callback_ =
+ base::Bind(&P2PSocketDispatcherHost::StopRtpDumpOnUIThread,
+ p2p_socket_dispatcher_host_);
+ }
+ return stop_rtp_dump_callback_;
+}
#endif
IPC::ChannelProxy* RenderProcessHostImpl::GetChannel() {
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.h ('k') | content/public/browser/render_process_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698