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

Unified Diff: net/tools/quic/quic_dispatcher.cc

Issue 972783002: Remove unnecessary virtual CreateQuicConnection method. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cleanup
Patch Set: Created 5 years, 10 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/tools/quic/quic_dispatcher.h ('k') | net/tools/quic/test_tools/quic_dispatcher_peer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/quic_dispatcher.cc
diff --git a/net/tools/quic/quic_dispatcher.cc b/net/tools/quic/quic_dispatcher.cc
index 8f19cf4e54b13b9414109978b59f846d5b6322ef..9921940927b3d4319f67e9c0f648da7e5f7bfd9a 100644
--- a/net/tools/quic/quic_dispatcher.cc
+++ b/net/tools/quic/quic_dispatcher.cc
@@ -372,28 +372,17 @@ QuicSession* QuicDispatcher::CreateQuicSession(
QuicConnectionId connection_id,
const IPEndPoint& server_address,
const IPEndPoint& client_address) {
- QuicServerSession* session = new QuicServerSession(
- config_,
- CreateQuicConnection(connection_id, server_address, client_address),
- this);
+ // The QuicSession takes ownership of |connection| below.
+ QuicConnection* connection = new QuicConnection(
+ connection_id, client_address, helper_.get(), connection_writer_factory_,
+ /* owns_writer= */ true, /* is_server= */ true,
+ crypto_config_.HasProofSource(), supported_versions_);
+
+ QuicServerSession* session = new QuicServerSession(config_, connection, this);
session->InitializeSession(crypto_config_);
return session;
}
-QuicConnection* QuicDispatcher::CreateQuicConnection(
- QuicConnectionId connection_id,
- const IPEndPoint& server_address,
- const IPEndPoint& client_address) {
- return new QuicConnection(connection_id,
- client_address,
- helper_.get(),
- connection_writer_factory_,
- /* owns_writer= */ true,
- /* is_server= */ true,
- crypto_config_.HasProofSource(),
- supported_versions_);
-}
-
QuicTimeWaitListManager* QuicDispatcher::CreateQuicTimeWaitListManager() {
return new QuicTimeWaitListManager(
writer_.get(), this, epoll_server(), supported_versions());
« no previous file with comments | « net/tools/quic/quic_dispatcher.h ('k') | net/tools/quic/test_tools/quic_dispatcher_peer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698