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

Unified Diff: net/tools/quic/test_tools/quic_test_client.h

Issue 344053002: Refactoring QuicClient so it doesn't own the epoll server it uses. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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/tools/quic/quic_client_bin.cc ('k') | net/tools/quic/test_tools/quic_test_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/test_tools/quic_test_client.h
diff --git a/net/tools/quic/test_tools/quic_test_client.h b/net/tools/quic/test_tools/quic_test_client.h
index 1c70c33a18644164525c951feb1350f32c5387dd..1201602bae6ea21aaee8dbe787705c4ea1449b81 100644
--- a/net/tools/quic/test_tools/quic_test_client.h
+++ b/net/tools/quic/test_tools/quic_test_client.h
@@ -14,6 +14,7 @@
#include "net/quic/quic_packet_creator.h"
#include "net/quic/quic_protocol.h"
#include "net/tools/balsa/balsa_frame.h"
+#include "net/tools/epoll_server/epoll_server.h"
#include "net/tools/quic/quic_client.h"
#include "net/tools/quic/test_tools/simple_client.h"
@@ -35,12 +36,14 @@ class MockableQuicClient : public QuicClient {
public:
MockableQuicClient(IPEndPoint server_address,
const QuicServerId& server_id,
- const QuicVersionVector& supported_versions);
+ const QuicVersionVector& supported_versions,
+ EpollServer* epoll_server);
MockableQuicClient(IPEndPoint server_address,
const QuicServerId& server_id,
const QuicConfig& config,
- const QuicVersionVector& supported_versions);
+ const QuicVersionVector& supported_versions,
+ EpollServer* epoll_server);
virtual ~MockableQuicClient() OVERRIDE;
virtual QuicPacketWriter* CreateQuicPacketWriter() OVERRIDE;
@@ -157,6 +160,8 @@ class QuicTestClient : public SimpleClient,
void WaitForWriteToFlush();
+ EpollServer* epoll_server() { return &epoll_server_; }
+
protected:
QuicTestClient();
@@ -165,6 +170,7 @@ class QuicTestClient : public SimpleClient,
void set_client(MockableQuicClient* client) { client_.reset(client); }
private:
+ EpollServer epoll_server_;
scoped_ptr<MockableQuicClient> client_; // The actual client
QuicSpdyClientStream* stream_;
« no previous file with comments | « net/tools/quic/quic_client_bin.cc ('k') | net/tools/quic/test_tools/quic_test_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698