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

Unified Diff: net/quic/p2p/quic_p2p_session_test.cc

Issue 1905843003: Split out QuicAlarm creation from QuicConnectionHelper to new QuicAlarmFactory. No behavior change,… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@119753783
Patch Set: Rebase 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
« no previous file with comments | « net/quic/bidirectional_stream_quic_impl_unittest.cc ('k') | net/quic/quic_alarm_factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/p2p/quic_p2p_session_test.cc
diff --git a/net/quic/p2p/quic_p2p_session_test.cc b/net/quic/p2p/quic_p2p_session_test.cc
index 0223069036ab14301b73ef5ee363dccc10562417..14a7971e701426b4d5afbd6efb319e167ece0fd8 100644
--- a/net/quic/p2p/quic_p2p_session_test.cc
+++ b/net/quic/p2p/quic_p2p_session_test.cc
@@ -18,6 +18,7 @@
#include "net/quic/crypto/quic_random.h"
#include "net/quic/p2p/quic_p2p_crypto_config.h"
#include "net/quic/p2p/quic_p2p_stream.h"
+#include "net/quic/quic_chromium_alarm_factory.h"
#include "net/quic/quic_chromium_connection_helper.h"
#include "net/quic/quic_chromium_packet_writer.h"
#include "net/quic/test_tools/quic_session_peer.h"
@@ -196,9 +197,10 @@ class QuicP2PSessionTest : public ::testing::Test {
protected:
QuicP2PSessionTest()
- : quic_helper_(base::ThreadTaskRunnerHandle::Get().get(),
- &quic_clock_,
- QuicRandom::GetInstance()) {
+ : quic_helper_(&quic_clock_,
+ QuicRandom::GetInstance()),
+ alarm_factory_(base::ThreadTaskRunnerHandle::Get().get(),
+ &quic_clock_) {
// Simulate out-of-bound config handshake.
CryptoHandshakeMessage hello_message;
config_.ToHandshakeMessage(&hello_message);
@@ -230,7 +232,7 @@ class QuicP2PSessionTest : public ::testing::Test {
QuicChromiumPacketWriter* writer =
new QuicChromiumPacketWriter(socket.get());
std::unique_ptr<QuicConnection> quic_connection1(new QuicConnection(
- 0, IPEndPoint(IPAddress::IPv4AllZeros(), 0), &quic_helper_, writer,
+ 0, IPEndPoint(IPAddress::IPv4AllZeros(), 0), &quic_helper_, &alarm_factory_, writer,
true /* owns_writer */, perspective, QuicSupportedVersions()));
writer->SetConnection(quic_connection1.get());
@@ -247,6 +249,7 @@ class QuicP2PSessionTest : public ::testing::Test {
QuicClock quic_clock_;
QuicChromiumConnectionHelper quic_helper_;
+ QuicChromiumAlarmFactory alarm_factory_;
QuicConfig config_;
base::WeakPtr<FakeP2PDatagramSocket> socket1_;
« no previous file with comments | « net/quic/bidirectional_stream_quic_impl_unittest.cc ('k') | net/quic/quic_alarm_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698