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

Unified Diff: webrtc/p2p/quic/quicconnectionhelper.cc

Issue 1834233002: Update QuicTransportChannel to latest version of libquic (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 9 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/p2p/quic/quicconnectionhelper.h ('k') | webrtc/p2p/quic/quicconnectionhelper_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/quic/quicconnectionhelper.cc
diff --git a/webrtc/p2p/quic/quicconnectionhelper.cc b/webrtc/p2p/quic/quicconnectionhelper.cc
index af5b4b213bf460482dbd4069c275b4c08645e4c5..f9b4697d50a148470b0534e34c4078c0ba721ca6 100644
--- a/webrtc/p2p/quic/quicconnectionhelper.cc
+++ b/webrtc/p2p/quic/quicconnectionhelper.cc
@@ -14,13 +14,21 @@ namespace cricket {
QuicAlarm* QuicConnectionHelper::CreateAlarm(
net::QuicAlarm::Delegate* delegate) {
- return new QuicAlarm(GetClock(), thread_, delegate);
+ return new QuicAlarm(GetClock(), thread_,
+ net::QuicArenaScopedPtr<QuicAlarm::Delegate>(delegate));
+}
+
+net::QuicArenaScopedPtr<net::QuicAlarm> QuicConnectionHelper::CreateAlarm(
+ net::QuicArenaScopedPtr<QuicAlarm::Delegate> delegate,
+ net::QuicConnectionArena* arena) {
+ return net::QuicArenaScopedPtr<QuicAlarm>(
+ new QuicAlarm(GetClock(), thread_, std::move(delegate)));
}
QuicAlarm::QuicAlarm(const net::QuicClock* clock,
rtc::Thread* thread,
- QuicAlarm::Delegate* delegate)
- : net::QuicAlarm(delegate), clock_(clock), thread_(thread) {}
+ net::QuicArenaScopedPtr<net::QuicAlarm::Delegate> delegate)
+ : net::QuicAlarm(std::move(delegate)), clock_(clock), thread_(thread) {}
QuicAlarm::~QuicAlarm() {}
@@ -39,7 +47,7 @@ void QuicAlarm::OnMessage(rtc::Message* msg) {
Fire();
}
-int64 QuicAlarm::GetDelay() const {
+int64_t QuicAlarm::GetDelay() const {
return deadline().Subtract(clock_->Now()).ToMilliseconds();
}
@@ -47,7 +55,7 @@ void QuicAlarm::SetImpl() {
DCHECK(deadline().IsInitialized());
CancelImpl(); // Unregister if already posted.
- int64 delay_ms = GetDelay();
+ int64_t delay_ms = GetDelay();
if (delay_ms < 0) {
delay_ms = 0;
}
@@ -71,4 +79,8 @@ net::QuicRandom* QuicConnectionHelper::GetRandomGenerator() {
return net::QuicRandom::GetInstance();
}
+net::QuicBufferAllocator* QuicConnectionHelper::GetBufferAllocator() {
+ return &buffer_allocator_;
+}
+
} // namespace cricket
« no previous file with comments | « webrtc/p2p/quic/quicconnectionhelper.h ('k') | webrtc/p2p/quic/quicconnectionhelper_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698