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

Unified Diff: net/quic/test_tools/quic_test_utils.h

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_test_packet_maker.cc ('k') | net/quic/test_tools/quic_test_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/test_tools/quic_test_utils.h
diff --git a/net/quic/test_tools/quic_test_utils.h b/net/quic/test_tools/quic_test_utils.h
index a2a8951f811c4aa90023761945d01c0cbb2ff39b..6900bbd380c71926c0df7ffc665e00ee753baee5 100644
--- a/net/quic/test_tools/quic_test_utils.h
+++ b/net/quic/test_tools/quic_test_utils.h
@@ -20,6 +20,7 @@
#include "net/quic/quic_dispatcher.h"
#include "net/quic/quic_framer.h"
#include "net/quic/quic_per_connection_packet_writer.h"
+#include "net/quic/quic_protocol.h"
#include "net/quic/quic_sent_packet_manager.h"
#include "net/quic/quic_session.h"
#include "net/quic/test_tools/mock_clock.h"
@@ -290,19 +291,20 @@ class NiceMockPacketWriterFactory : public QuicConnection::PacketWriterFactory {
class MockConnection : public QuicConnection {
public:
// Uses a MockHelper, ConnectionId of 42, and 127.0.0.1:123.
- explicit MockConnection(bool is_server);
+ explicit MockConnection(Perspective perspective);
// Uses a MockHelper, ConnectionId of 42, and 127.0.0.1:123.
- MockConnection(bool is_server, bool is_secure);
+ MockConnection(Perspective perspective, bool is_secure);
// Uses a MockHelper, ConnectionId of 42.
- MockConnection(IPEndPoint address, bool is_server);
+ MockConnection(IPEndPoint address, Perspective perspective);
// Uses a MockHelper, and 127.0.0.1:123
- MockConnection(QuicConnectionId connection_id, bool is_server);
+ MockConnection(QuicConnectionId connection_id, Perspective perspective);
// Uses a Mock helper, ConnectionId of 42, and 127.0.0.1:123.
- MockConnection(bool is_server, const QuicVersionVector& supported_versions);
+ MockConnection(Perspective perspective,
+ const QuicVersionVector& supported_versions);
~MockConnection() override;
@@ -350,9 +352,9 @@ class MockConnection : public QuicConnection {
class PacketSavingConnection : public MockConnection {
public:
- explicit PacketSavingConnection(bool is_server);
+ explicit PacketSavingConnection(Perspective perspective);
- PacketSavingConnection(bool is_server,
+ PacketSavingConnection(Perspective perspective,
const QuicVersionVector& supported_versions);
~PacketSavingConnection() override;
@@ -464,9 +466,10 @@ class MockSendAlgorithm : public SendAlgorithmInterface {
MockSendAlgorithm();
~MockSendAlgorithm() override;
- MOCK_METHOD3(SetFromConfig, void(const QuicConfig& config,
- bool is_server,
- bool using_pacing));
+ MOCK_METHOD3(SetFromConfig,
+ void(const QuicConfig& config,
+ Perspective perspective,
+ bool using_pacing));
MOCK_METHOD1(SetNumEmulatedConnections, void(int num_connections));
MOCK_METHOD1(SetMaxPacketSize, void(QuicByteCount max_packet_size));
MOCK_METHOD4(OnCongestionEvent, void(bool rtt_updated,
« no previous file with comments | « net/quic/test_tools/quic_test_packet_maker.cc ('k') | net/quic/test_tools/quic_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698