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

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

Issue 1871533002: Change WebRTC log callback registration in browser process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Code review (olka) Created 4 years, 8 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 5ba1bc8e865bd5949b56f6b3d3068da843b266b6..0f0df3b78d4bc1a28973698950e896fc401c5cc6 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -1881,10 +1881,8 @@ void RenderProcessHostImpl::Cleanup() {
}
#if defined(ENABLE_WEBRTC)
- if (is_initialized_) {
- BrowserMainLoop::GetInstance()->media_stream_manager()->
- UnregisterNativeLogCallback(GetID());
- }
+ if (is_initialized_)
+ ClearWebRtcLogMessageCallback();
#endif
// When there are no other owners of this object, we can delete ourselves.
@@ -2061,6 +2059,14 @@ void RenderProcessHostImpl::SetWebRtcLogMessageCallback(
#endif
}
+void RenderProcessHostImpl::ClearWebRtcLogMessageCallback() {
+#if defined(ENABLE_WEBRTC)
+ BrowserMainLoop::GetInstance()
+ ->media_stream_manager()
+ ->UnregisterNativeLogCallback(GetID());
+#endif
+}
+
RenderProcessHostImpl::WebRtcStopRtpDumpCallback
RenderProcessHostImpl::StartRtpDump(
bool incoming,
« 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