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

Unified Diff: net/quic/quic_session.cc

Issue 102313005: Remove the is_server argument from the QuicSession constructor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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_session.h ('k') | net/quic/quic_session_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_session.cc
diff --git a/net/quic/quic_session.cc b/net/quic/quic_session.cc
index 360c79e62f5f1e0076e3df62916c9f44fcd18f8e..67cdf54d1d1349c7ac4ec829a1b247972ebedd27 100644
--- a/net/quic/quic_session.cc
+++ b/net/quic/quic_session.cc
@@ -20,7 +20,7 @@ namespace net {
const size_t kMaxPrematurelyClosedStreamsTracked = 20;
const size_t kMaxZombieStreams = 20;
-#define ENDPOINT (is_server_ ? "Server: " : " Client: ")
+#define ENDPOINT (is_server() ? "Server: " : " Client: ")
// We want to make sure we delete any closed streams in a safe manner.
// To avoid deleting a stream in mid-operation, we have a simple shim between
@@ -78,14 +78,12 @@ class VisitorShim : public QuicConnectionVisitorInterface {
};
QuicSession::QuicSession(QuicConnection* connection,
- const QuicConfig& config,
- bool is_server)
+ const QuicConfig& config)
: connection_(connection),
visitor_shim_(new VisitorShim(this)),
config_(config),
max_open_streams_(config_.max_streams_per_connection()),
- next_stream_id_(is_server ? 2 : 3),
- is_server_(is_server),
+ next_stream_id_(is_server() ? 2 : 3),
largest_peer_created_stream_id_(0),
error_(QUIC_NO_ERROR),
goaway_received_(false),
@@ -293,7 +291,7 @@ void QuicSession::CloseStreamInner(QuicStreamId stream_id,
// a request before receiving the response) then we need to make sure that
// we keep the stream alive long enough to process any response or
// RST_STREAM frames.
- if (locally_reset && !is_server_) {
+ if (locally_reset && !is_server()) {
AddZombieStream(stream_id);
return;
}
« no previous file with comments | « net/quic/quic_session.h ('k') | net/quic/quic_session_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698