| Index: net/quic/quic_stream_factory.cc
|
| diff --git a/net/quic/quic_stream_factory.cc b/net/quic/quic_stream_factory.cc
|
| index ee04541edb4b6a28aa2722fc5a9e768293f187e4..686cd9cc834b806c21c260c85e93118be5a3be40 100644
|
| --- a/net/quic/quic_stream_factory.cc
|
| +++ b/net/quic/quic_stream_factory.cc
|
| @@ -38,6 +38,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"
|
| @@ -1557,17 +1558,20 @@ 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_);
|
|
|
|
|