Index: net/quic/quic_stream_factory.cc |
diff --git a/net/quic/quic_stream_factory.cc b/net/quic/quic_stream_factory.cc |
index ba1750e7fffb2c610b48f4cb855848a34047451e..0b922fdbca6809dbfa0ec9cd62e607440a72b523 100644 |
--- a/net/quic/quic_stream_factory.cc |
+++ b/net/quic/quic_stream_factory.cc |
@@ -40,6 +40,7 @@ |
#include "net/quic/crypto/quic_random.h" |
#include "net/quic/crypto/quic_server_info.h" |
#include "net/quic/port_suggester.h" |
+#include "net/quic/quic_chromium_alarm_factory.h" |
#include "net/quic/quic_chromium_client_session.h" |
#include "net/quic/quic_chromium_connection_helper.h" |
#include "net/quic/quic_chromium_packet_reader.h" |
@@ -1547,15 +1548,19 @@ int QuicStreamFactory::CreateSession( |
if (!helper_.get()) { |
helper_.reset(new QuicChromiumConnectionHelper( |
- base::ThreadTaskRunnerHandle::Get().get(), clock_.get(), |
- random_generator_)); |
+ clock_.get(), random_generator_)); |
+ } |
+ |
+ if (!alarm_factory_.get()) { |
+ alarm_factory_.reset(new QuicChromiumAlarmFactory( |
+ base::ThreadTaskRunnerHandle::Get().get(), clock_.get())); |
} |
QuicConnectionId connection_id = random_generator_->RandUint64(); |
InitializeCachedStateInCryptoConfig(server_id, server_info, &connection_id); |
QuicChromiumPacketWriter* writer = new QuicChromiumPacketWriter(socket.get()); |
QuicConnection* connection = new QuicConnection( |
- connection_id, addr, helper_.get(), writer, true /* owns_writer */, |
+ connection_id, addr, helper_.get(), alarm_factory_.get(), writer, true /* owns_writer */, |
Perspective::IS_CLIENT, supported_versions_); |
writer->SetConnection(connection); |
connection->SetMaxPacketLength(max_packet_length_); |