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

Unified Diff: webrtc/pc/peerconnectionfactory.cc

Issue 3005153002: Reland of Make RtcEventLogImpl to use a TaskQueue instead of a helper-thread (Closed)
Patch Set: RtcEventLog created on same thread as it's destroyed. Created 3 years, 3 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 | « webrtc/pc/peerconnectionfactory.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/pc/peerconnectionfactory.cc
diff --git a/webrtc/pc/peerconnectionfactory.cc b/webrtc/pc/peerconnectionfactory.cc
index d4ee405f1a3e55d0c9d6205510b4e831e94c9cea..49e357a1c979cc7be9cdf7a09ca8c13bc9ad42df 100644
--- a/webrtc/pc/peerconnectionfactory.cc
+++ b/webrtc/pc/peerconnectionfactory.cc
@@ -21,7 +21,6 @@
#include "webrtc/logging/rtc_event_log/rtc_event_log.h"
#include "webrtc/rtc_base/bind.h"
#include "webrtc/rtc_base/checks.h"
-#include "webrtc/rtc_base/ptr_util.h"
// Adding 'nogncheck' to disable the gn include headers check to support modular
// WebRTC build targets.
// TODO(zhihuang): This wouldn't be necessary if the interface and
@@ -262,8 +261,9 @@ PeerConnectionFactory::CreatePeerConnection(
allocator.get(), options_.network_ignore_mask));
std::unique_ptr<RtcEventLog> event_log =
eladalon 2017/09/05 13:04:32 There's a trade-off between Invoke()-ing twice (bl
- event_log_factory_ ? event_log_factory_->CreateRtcEventLog()
- : rtc::MakeUnique<RtcEventLogNullImpl>();
+ worker_thread_->Invoke<std::unique_ptr<RtcEventLog>>(
+ RTC_FROM_HERE,
+ rtc::Bind(&PeerConnectionFactory::CreateRtcEventLog_w, this));
std::unique_ptr<Call> call = worker_thread_->Invoke<std::unique_ptr<Call>>(
RTC_FROM_HERE,
@@ -331,6 +331,11 @@ rtc::Thread* PeerConnectionFactory::network_thread() {
return network_thread_;
}
+std::unique_ptr<RtcEventLog> PeerConnectionFactory::CreateRtcEventLog_w() {
+ return event_log_factory_ ? event_log_factory_->CreateRtcEventLog()
+ : rtc::MakeUnique<RtcEventLogNullImpl>();
+}
+
std::unique_ptr<Call> PeerConnectionFactory::CreateCall_w(
RtcEventLog* event_log) {
const int kMinBandwidthBps = 30000;
« no previous file with comments | « webrtc/pc/peerconnectionfactory.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698