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

Unified Diff: net/quic/quic_data_stream.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_crypto_stream_test.cc ('k') | net/quic/quic_data_stream_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_data_stream.cc
diff --git a/net/quic/quic_data_stream.cc b/net/quic/quic_data_stream.cc
index 10f8b4c33185d24f86901cd2c48474c8888ee7bc..55f92056adf2b50d1a738bbc081b7812876f41a1 100644
--- a/net/quic/quic_data_stream.cc
+++ b/net/quic/quic_data_stream.cc
@@ -14,7 +14,9 @@ using std::min;
namespace net {
-#define ENDPOINT (session()->is_server() ? "Server: " : " Client: ")
+#define ENDPOINT \
+ (session()->perspective() == Perspective::IS_SERVER ? "Server: " : "Client:" \
+ " ")
namespace {
@@ -150,7 +152,7 @@ void QuicDataStream::OnStreamHeaders(StringPiece headers_data) {
}
void QuicDataStream::OnStreamHeadersPriority(QuicPriority priority) {
- DCHECK(session()->connection()->is_server());
+ DCHECK_EQ(Perspective::IS_SERVER, session()->connection()->perspective());
set_priority(priority);
}
« no previous file with comments | « net/quic/quic_crypto_stream_test.cc ('k') | net/quic/quic_data_stream_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698