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

Unified Diff: net/quic/quic_stream_factory.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/quic_stream_factory.h ('k') | net/quic/quic_stream_sequencer_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_);
« no previous file with comments | « net/quic/quic_stream_factory.h ('k') | net/quic/quic_stream_sequencer_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698