Index: net/tools/quic/quic_simple_client.cc |
diff --git a/net/tools/quic/quic_simple_client.cc b/net/tools/quic/quic_simple_client.cc |
index c04d0b6c218f9813542f1a7174da31f65705b5e4..43886bb4126983166deed3c1dfa661c7f1b4604d 100644 |
--- a/net/tools/quic/quic_simple_client.cc |
+++ b/net/tools/quic/quic_simple_client.cc |
@@ -11,6 +11,7 @@ |
#include "net/http/http_request_info.h" |
#include "net/http/http_response_info.h" |
#include "net/quic/crypto/quic_random.h" |
+#include "net/quic/quic_chromium_alarm_factory.h" |
#include "net/quic/quic_chromium_connection_helper.h" |
#include "net/quic/quic_chromium_packet_reader.h" |
#include "net/quic/quic_chromium_packet_writer.h" |
@@ -42,6 +43,7 @@ QuicSimpleClient::QuicSimpleClient(IPEndPoint server_address, |
supported_versions, |
QuicConfig(), |
CreateQuicConnectionHelper(), |
+ CreateQuicAlarmFactory(), |
proof_verifier), |
server_address_(server_address), |
local_port_(0), |
@@ -58,6 +60,7 @@ QuicSimpleClient::QuicSimpleClient(IPEndPoint server_address, |
supported_versions, |
config, |
CreateQuicConnectionHelper(), |
+ CreateQuicAlarmFactory(), |
proof_verifier), |
server_address_(server_address), |
local_port_(0), |
@@ -68,7 +71,7 @@ QuicSimpleClient::QuicSimpleClient(IPEndPoint server_address, |
QuicSimpleClient::~QuicSimpleClient() { |
if (connected()) { |
session()->connection()->CloseConnection( |
- QUIC_PEER_GOING_AWAY, "", |
+ QUIC_PEER_GOING_AWAY, "Shutting down", |
ConnectionCloseBehavior::SEND_CONNECTION_CLOSE_PACKET); |
} |
STLDeleteElements(&data_to_resend_on_connect_); |
@@ -214,7 +217,7 @@ void QuicSimpleClient::StartConnect() { |
} |
CreateQuicClientSession(new QuicConnection( |
- GetNextConnectionId(), server_address_, helper(), writer(), |
+ GetNextConnectionId(), server_address_, helper(), alarm_factory(), writer(), |
/* owns_writer= */ false, Perspective::IS_CLIENT, supported_versions())); |
session()->Initialize(); |
@@ -377,8 +380,12 @@ QuicConnectionId QuicSimpleClient::GenerateNewConnectionId() { |
QuicChromiumConnectionHelper* QuicSimpleClient::CreateQuicConnectionHelper() { |
return new QuicChromiumConnectionHelper( |
- base::ThreadTaskRunnerHandle::Get().get(), &clock_, |
- QuicRandom::GetInstance()); |
+ &clock_, QuicRandom::GetInstance()); |
+} |
+ |
+QuicChromiumAlarmFactory* QuicSimpleClient::CreateQuicAlarmFactory() { |
+ return new QuicChromiumAlarmFactory( |
+ base::ThreadTaskRunnerHandle::Get().get(), &clock_); |
} |
QuicPacketWriter* QuicSimpleClient::CreateQuicPacketWriter() { |