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

Unified Diff: net/quic/test_tools/quic_connection_peer.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/test_tools/quic_connection_peer.h ('k') | net/quic/test_tools/quic_framer_peer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/test_tools/quic_connection_peer.cc
diff --git a/net/quic/test_tools/quic_connection_peer.cc b/net/quic/test_tools/quic_connection_peer.cc
index dd75ca808e008102f1416c868a0cc0ca0532a957..3525a3247ef52feb00204d5db3aae5e6d36ba0f6 100644
--- a/net/quic/test_tools/quic_connection_peer.cc
+++ b/net/quic/test_tools/quic_connection_peer.cc
@@ -100,15 +100,10 @@ QuicPacketEntropyHash QuicConnectionPeer::ReceivedEntropyHash(
}
// static
-bool QuicConnectionPeer::IsServer(QuicConnection* connection) {
- return connection->is_server_;
-}
-
-// static
-void QuicConnectionPeer::SetIsServer(QuicConnection* connection,
- bool is_server) {
- connection->is_server_ = is_server;
- QuicFramerPeer::SetIsServer(&connection->framer_, is_server);
+void QuicConnectionPeer::SetPerspective(QuicConnection* connection,
+ Perspective perspective) {
+ connection->perspective_ = perspective;
+ QuicFramerPeer::SetPerspective(&connection->framer_, perspective);
}
// static
« no previous file with comments | « net/quic/test_tools/quic_connection_peer.h ('k') | net/quic/test_tools/quic_framer_peer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698