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

Unified Diff: content/renderer/media/webrtc_logging.cc

Issue 956263003: Remove CHECK(!g_webrtc_logging_delegate) for --single-process model Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « AUTHORS ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/webrtc_logging.cc
diff --git a/content/renderer/media/webrtc_logging.cc b/content/renderer/media/webrtc_logging.cc
index 17e5c5745420d96fcd68aefd64911bdf1f9c5140..28ed9996d664ccb88770e7676a8dc8db612935f2 100644
--- a/content/renderer/media/webrtc_logging.cc
+++ b/content/renderer/media/webrtc_logging.cc
@@ -4,17 +4,25 @@
#include "content/renderer/media/webrtc_logging.h"
+#include "base/command_line.h"
#include "base/time/time.h"
+#include "content/public/common/content_switches.h"
#include "content/public/renderer/webrtc_log_message_delegate.h"
#include "third_party/webrtc/overrides/webrtc/base/logging.h"
namespace content {
-// Shall only be set once and never go back to NULL.
+// Shall only be set once and never go back to NULL
+// except for single process model.
WebRtcLogMessageDelegate* g_webrtc_logging_delegate = NULL;
void InitWebRtcLoggingDelegate(WebRtcLogMessageDelegate* delegate) {
- CHECK(!g_webrtc_logging_delegate);
+ // We will not check g_webrtc_logging_delegate in single process mode,
+ // since g_webrtc_logging_delegate may shared by two RenderThreads in
+ // the same browser process.
+ CHECK(base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kSingleProcess) ||
+ !g_webrtc_logging_delegate);
tommi (sloooow) - chröme 2015/03/04 13:23:20 In the case where g_webrtc_logging_delegate is not
jinlong.zhai 2015/03/05 01:50:17 In this case, it will overwrite the provious value
CHECK(delegate);
g_webrtc_logging_delegate = delegate;
« no previous file with comments | « AUTHORS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698