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

Unified Diff: webrtc/pc/ortcfactory.cc

Issue 2719683002: Rewrite rtc::Bind using variadic templates. (Closed)
Patch Set: Mention where sequence_generator comes from in a comment. Created 3 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 | « webrtc/base/template_util.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/pc/ortcfactory.cc
diff --git a/webrtc/pc/ortcfactory.cc b/webrtc/pc/ortcfactory.cc
index 47d39b7cb0e7b8a5bf4a8b56048eb25154fbbc9d..aa5e1819fbe7c5833b97172a3e95cd6249047a2c 100644
--- a/webrtc/pc/ortcfactory.cc
+++ b/webrtc/pc/ortcfactory.cc
@@ -28,10 +28,16 @@ std::unique_ptr<OrtcFactoryInterface> OrtcFactoryInterface::Create(
rtc::PacketSocketFactory* socket_factory) {
// Hop to signaling thread if needed.
if (signaling_thread && !signaling_thread->IsCurrent()) {
+ // The template parameters are necessary because there are two
+ // OrtcFactoryInterface::Create methods, so the types can't be derived from
+ // just the function pointer.
return signaling_thread->Invoke<std::unique_ptr<OrtcFactoryInterface>>(
RTC_FROM_HERE,
- rtc::Bind(&OrtcFactoryInterface::Create, network_thread,
- signaling_thread, network_manager, socket_factory));
+ rtc::Bind<std::unique_ptr<OrtcFactoryInterface>, rtc::Thread*,
+ rtc::Thread*, rtc::NetworkManager*,
+ rtc::PacketSocketFactory*>(&OrtcFactoryInterface::Create,
+ network_thread, signaling_thread,
+ network_manager, socket_factory));
}
OrtcFactory* new_factory =
new OrtcFactory(network_thread, signaling_thread,
« no previous file with comments | « webrtc/base/template_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698