From 6f48aa977c765198ef16a9524f00ff97e35500c5 Mon Sep 17 00:00:00 2001 From: rtenneti Date: Sun, 15 Mar 2015 19:18:48 -0700 Subject: Create a Perspective enum to use instead of a bool is_server to improve readability. This also replaces the CryptoUtils::Perspective enun. Merge internal change: 88006458 R=rch@chromium.org Review URL: https://codereview.chromium.org/1009543004 Cr-Commit-Position: refs/heads/master@{#320694} --- net/quic/reliable_quic_stream.cc | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'net/quic/reliable_quic_stream.cc') diff --git a/net/quic/reliable_quic_stream.cc b/net/quic/reliable_quic_stream.cc index adb8051..6eb0378 100644 --- a/net/quic/reliable_quic_stream.cc +++ b/net/quic/reliable_quic_stream.cc @@ -17,7 +17,8 @@ using std::string; namespace net { -#define ENDPOINT (is_server_ ? "Server: " : " Client: ") +#define ENDPOINT \ + (perspective_ == Perspective::IS_SERVER ? "Server: " : "Client: ") namespace { @@ -126,12 +127,13 @@ ReliableQuicStream::ReliableQuicStream(QuicStreamId id, QuicSession* session) rst_sent_(false), rst_received_(false), fec_policy_(FEC_PROTECT_OPTIONAL), - is_server_(session_->is_server()), - flow_controller_( - session_->connection(), id_, is_server_, - GetReceivedFlowControlWindow(session), - GetInitialStreamFlowControlWindowToSend(session), - GetInitialStreamFlowControlWindowToSend(session)), + perspective_(session_->perspective()), + flow_controller_(session_->connection(), + id_, + perspective_, + GetReceivedFlowControlWindow(session), + GetInitialStreamFlowControlWindowToSend(session), + GetInitialStreamFlowControlWindowToSend(session)), connection_flow_controller_(session_->flow_controller()), stream_contributes_to_connection_flow_control_(true) { } -- cgit v1.1