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

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

Issue 1009543004: Create a Perspective enum to use instead of a bool is_server to improve (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added NET_EXPORT_PRIVATE to fix compiler error Created 5 years, 9 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_client_session_test.cc ('k') | net/tools/quic/quic_dispatcher_test.cc » ('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 7be789a62fb4bbc9b47e396722a992bf01013471..8bb76bad9aea31ecaef1ab1e69f93376297f3a38 100644
--- a/net/tools/quic/quic_dispatcher.cc
+++ b/net/tools/quic/quic_dispatcher.cc
@@ -174,7 +174,9 @@ QuicDispatcher::QuicDispatcher(const QuicConfig& config,
connection_writer_factory_(this),
supported_versions_(supported_versions),
current_packet_(nullptr),
- framer_(supported_versions, /*unused*/ QuicTime::Zero(), true),
+ framer_(supported_versions,
+ /*unused*/ QuicTime::Zero(),
+ Perspective::IS_SERVER),
framer_visitor_(new QuicFramerVisitor(this)) {
framer_.set_visitor(framer_visitor_.get());
}
@@ -403,7 +405,7 @@ QuicSession* QuicDispatcher::CreateQuicSession(
// 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,
+ /* owns_writer= */ true, Perspective::IS_SERVER,
crypto_config_.HasProofSource(), supported_versions_);
QuicServerSession* session = new QuicServerSession(config_, connection, this);
« no previous file with comments | « net/tools/quic/quic_client_session_test.cc ('k') | net/tools/quic/quic_dispatcher_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698