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..6cab40e3e7d0c046a89c135cd023838c0f5f94b3 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" |
@@ -1546,17 +1547,21 @@ int QuicStreamFactory::CreateSession( |
} |
if (!helper_.get()) { |
- helper_.reset(new QuicChromiumConnectionHelper( |
- base::ThreadTaskRunnerHandle::Get().get(), clock_.get(), |
- random_generator_)); |
+ helper_.reset( |
+ new QuicChromiumConnectionHelper(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 */, |
- Perspective::IS_CLIENT, supported_versions_); |
+ 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_); |