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

Unified Diff: net/quic/quic_flow_controller.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/quic/quic_flow_controller.h ('k') | net/quic/quic_flow_controller_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_flow_controller.cc
diff --git a/net/quic/quic_flow_controller.cc b/net/quic/quic_flow_controller.cc
index 1fedd06aa813c7dfbf6f711fc0702d91ce6068e7..d95541edbcc98ddda7ded242ec74637d27954b24 100644
--- a/net/quic/quic_flow_controller.cc
+++ b/net/quic/quic_flow_controller.cc
@@ -11,17 +11,18 @@
namespace net {
-#define ENDPOINT (is_server_ ? "Server: " : " Client: ")
+#define ENDPOINT \
+ (perspective_ == Perspective::IS_SERVER ? "Server: " : "Client: ")
QuicFlowController::QuicFlowController(QuicConnection* connection,
QuicStreamId id,
- bool is_server,
+ Perspective perspective,
QuicStreamOffset send_window_offset,
QuicStreamOffset receive_window_offset,
QuicByteCount max_receive_window)
: connection_(connection),
id_(id),
- is_server_(is_server),
+ perspective_(perspective),
bytes_consumed_(0),
highest_received_byte_offset_(0),
bytes_sent_(0),
« no previous file with comments | « net/quic/quic_flow_controller.h ('k') | net/quic/quic_flow_controller_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698