Chromium Code Reviews| Index: net/socket/socket_test_util.cc |
| diff --git a/net/socket/socket_test_util.cc b/net/socket/socket_test_util.cc |
| index 308de2eaf6fe4de73868d8cec17f84748a570b89..2b51e2a927d852ba1566f5f5777731d33a4a925f 100644 |
| --- a/net/socket/socket_test_util.cc |
| +++ b/net/socket/socket_test_util.cc |
| @@ -24,6 +24,7 @@ |
| #include "net/http/http_response_headers.h" |
| #include "net/socket/client_socket_pool_histograms.h" |
| #include "net/socket/socket.h" |
| +#include "net/socket/websocket_endpoint_lock_manager.h" |
| #include "net/ssl/ssl_cert_request_info.h" |
| #include "net/ssl/ssl_connection_status_flags.h" |
| #include "net/ssl/ssl_info.h" |
| @@ -1983,6 +1984,19 @@ void MockSOCKSClientSocketPool::ReleaseSocket(const std::string& group_name, |
| return transport_pool_->ReleaseSocket(group_name, socket.Pass(), id); |
| } |
| +ScopedWebSocketEndpointZeroUnlockDelay:: |
| + ScopedWebSocketEndpointZeroUnlockDelay() { |
| + old_delay_ = |
| + WebSocketEndpointLockManager::GetInstance()->SetUnlockDelayForTesting( |
| + base::TimeDelta()); |
| +} |
| + |
| +ScopedWebSocketEndpointZeroUnlockDelay:: |
| + ~ScopedWebSocketEndpointZeroUnlockDelay() { |
| + WebSocketEndpointLockManager::GetInstance()->SetUnlockDelayForTesting( |
| + old_delay_); |
|
mmenke
2015/01/20 15:50:53
Suggest adding protection against having two of th
Adam Rice
2015/01/21 08:54:02
Done.
|
| +} |
| + |
| const char kSOCKS5GreetRequest[] = { 0x05, 0x01, 0x00 }; |
| const int kSOCKS5GreetRequestLength = arraysize(kSOCKS5GreetRequest); |