| Index: net/tools/quic/test_tools/quic_test_client.cc
|
| diff --git a/net/tools/quic/test_tools/quic_test_client.cc b/net/tools/quic/test_tools/quic_test_client.cc
|
| index d0cfe687b91a6b6e6047523dc7f43bff9bf44038..c8ae3a9423228165f07b4dcb7fdf897f577285f9 100644
|
| --- a/net/tools/quic/test_tools/quic_test_client.cc
|
| +++ b/net/tools/quic/test_tools/quic_test_client.cc
|
| @@ -104,11 +104,13 @@ BalsaHeaders* MungeHeaders(const BalsaHeaders* const_headers,
|
| MockableQuicClient::MockableQuicClient(
|
| IPEndPoint server_address,
|
| const QuicServerId& server_id,
|
| - const QuicVersionVector& supported_versions)
|
| + const QuicVersionVector& supported_versions,
|
| + EpollServer* epoll_server)
|
| : QuicClient(server_address,
|
| server_id,
|
| supported_versions,
|
| - false),
|
| + false,
|
| + epoll_server),
|
| override_connection_id_(0),
|
| test_writer_(NULL) {}
|
|
|
| @@ -116,12 +118,14 @@ MockableQuicClient::MockableQuicClient(
|
| IPEndPoint server_address,
|
| const QuicServerId& server_id,
|
| const QuicConfig& config,
|
| - const QuicVersionVector& supported_versions)
|
| + const QuicVersionVector& supported_versions,
|
| + EpollServer* epoll_server)
|
| : QuicClient(server_address,
|
| server_id,
|
| supported_versions,
|
| false,
|
| - config),
|
| + config,
|
| + epoll_server),
|
| override_connection_id_(0),
|
| test_writer_(NULL) {}
|
|
|
| @@ -163,7 +167,8 @@ QuicTestClient::QuicTestClient(IPEndPoint server_address,
|
| server_address.port(),
|
| false,
|
| PRIVACY_MODE_DISABLED),
|
| - supported_versions)) {
|
| + supported_versions,
|
| + &epoll_server_)) {
|
| Initialize(true);
|
| }
|
|
|
| @@ -176,7 +181,8 @@ QuicTestClient::QuicTestClient(IPEndPoint server_address,
|
| server_address.port(),
|
| secure,
|
| PRIVACY_MODE_DISABLED),
|
| - supported_versions)) {
|
| + supported_versions,
|
| + &epoll_server_)) {
|
| Initialize(secure);
|
| }
|
|
|
| @@ -193,7 +199,8 @@ QuicTestClient::QuicTestClient(
|
| secure,
|
| PRIVACY_MODE_DISABLED),
|
| config,
|
| - supported_versions)) {
|
| + supported_versions,
|
| + &epoll_server_)) {
|
| Initialize(secure);
|
| }
|
|
|
| @@ -404,9 +411,9 @@ void QuicTestClient::ClearPerRequestState() {
|
|
|
| void QuicTestClient::WaitForResponseForMs(int timeout_ms) {
|
| int64 timeout_us = timeout_ms * base::Time::kMicrosecondsPerMillisecond;
|
| - int64 old_timeout_us = client()->epoll_server()->timeout_in_us();
|
| + int64 old_timeout_us = epoll_server()->timeout_in_us();
|
| if (timeout_us > 0) {
|
| - client()->epoll_server()->set_timeout_in_us(timeout_us);
|
| + epoll_server()->set_timeout_in_us(timeout_us);
|
| }
|
| const QuicClock* clock =
|
| QuicConnectionPeer::GetHelper(client()->session()->connection())->
|
| @@ -419,15 +426,15 @@ void QuicTestClient::WaitForResponseForMs(int timeout_ms) {
|
| client_->WaitForEvents();
|
| }
|
| if (timeout_us > 0) {
|
| - client()->epoll_server()->set_timeout_in_us(old_timeout_us);
|
| + epoll_server()->set_timeout_in_us(old_timeout_us);
|
| }
|
| }
|
|
|
| void QuicTestClient::WaitForInitialResponseForMs(int timeout_ms) {
|
| int64 timeout_us = timeout_ms * base::Time::kMicrosecondsPerMillisecond;
|
| - int64 old_timeout_us = client()->epoll_server()->timeout_in_us();
|
| + int64 old_timeout_us = epoll_server()->timeout_in_us();
|
| if (timeout_us > 0) {
|
| - client()->epoll_server()->set_timeout_in_us(timeout_us);
|
| + epoll_server()->set_timeout_in_us(timeout_us);
|
| }
|
| const QuicClock* clock =
|
| QuicConnectionPeer::GetHelper(client()->session()->connection())->
|
| @@ -441,7 +448,7 @@ void QuicTestClient::WaitForInitialResponseForMs(int timeout_ms) {
|
| client_->WaitForEvents();
|
| }
|
| if (timeout_us > 0) {
|
| - client()->epoll_server()->set_timeout_in_us(old_timeout_us);
|
| + epoll_server()->set_timeout_in_us(old_timeout_us);
|
| }
|
| }
|
|
|
|
|