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

Side by Side Diff: net/socket/transport_client_socket_pool_test_util.h

Issue 1376473003: Notify NQE of TCP RTT values (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More plumbing Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Test methods and classes common to transport_client_socket_pool_unittest.cc 5 // Test methods and classes common to transport_client_socket_pool_unittest.cc
6 // and websocket_transport_client_socket_pool_unittest.cc. If you find you need 6 // and websocket_transport_client_socket_pool_unittest.cc. If you find you need
7 // to use these for another purpose, consider moving them to socket_test_util.h. 7 // to use these for another purpose, consider moving them to socket_test_util.h.
8 8
9 #ifndef NET_SOCKET_TRANSPORT_CLIENT_SOCKET_POOL_TEST_UTIL_H_ 9 #ifndef NET_SOCKET_TRANSPORT_CLIENT_SOCKET_POOL_TEST_UTIL_H_
10 #define NET_SOCKET_TRANSPORT_CLIENT_SOCKET_POOL_TEST_UTIL_H_ 10 #define NET_SOCKET_TRANSPORT_CLIENT_SOCKET_POOL_TEST_UTIL_H_
11 11
12 #include <queue> 12 #include <queue>
13 13
14 #include "base/callback.h" 14 #include "base/callback.h"
15 #include "base/compiler_specific.h" 15 #include "base/compiler_specific.h"
16 #include "base/macros.h" 16 #include "base/macros.h"
17 #include "base/memory/scoped_ptr.h" 17 #include "base/memory/scoped_ptr.h"
18 #include "base/time/time.h" 18 #include "base/time/time.h"
19 #include "net/base/address_list.h" 19 #include "net/base/address_list.h"
20 #include "net/log/net_log.h" 20 #include "net/log/net_log.h"
21 #include "net/socket/client_socket_factory.h" 21 #include "net/socket/client_socket_factory.h"
22 #include "net/socket/client_socket_handle.h" 22 #include "net/socket/client_socket_handle.h"
23 #include "net/socket/stream_socket.h" 23 #include "net/socket/stream_socket.h"
24 24
25 namespace net { 25 namespace net {
26 26
27 class ClientSocketHandle; 27 class ClientSocketHandle;
28 class IPEndPoint; 28 class IPEndPoint;
29 class SocketPerformanceWatcherFactory;
29 30
30 // Make sure |handle| sets load times correctly when it has been assigned a 31 // Make sure |handle| sets load times correctly when it has been assigned a
31 // reused socket. Uses gtest expectations. 32 // reused socket. Uses gtest expectations.
32 void TestLoadTimingInfoConnectedReused(const ClientSocketHandle& handle); 33 void TestLoadTimingInfoConnectedReused(const ClientSocketHandle& handle);
33 34
34 // Make sure |handle| sets load times correctly when it has been assigned a 35 // Make sure |handle| sets load times correctly when it has been assigned a
35 // fresh socket. Also runs TestLoadTimingInfoConnectedReused, since the owner 36 // fresh socket. Also runs TestLoadTimingInfoConnectedReused, since the owner
36 // of a connection where |is_reused| is false may consider the connection 37 // of a connection where |is_reused| is false may consider the connection
37 // reused. Uses gtest expectations. 38 // reused. Uses gtest expectations.
38 void TestLoadTimingInfoConnectedNotReused(const ClientSocketHandle& handle); 39 void TestLoadTimingInfoConnectedNotReused(const ClientSocketHandle& handle);
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 ~MockTransportClientSocketFactory() override; 74 ~MockTransportClientSocketFactory() override;
74 75
75 scoped_ptr<DatagramClientSocket> CreateDatagramClientSocket( 76 scoped_ptr<DatagramClientSocket> CreateDatagramClientSocket(
76 DatagramSocket::BindType bind_type, 77 DatagramSocket::BindType bind_type,
77 const RandIntCallback& rand_int_cb, 78 const RandIntCallback& rand_int_cb,
78 NetLog* net_log, 79 NetLog* net_log,
79 const NetLog::Source& source) override; 80 const NetLog::Source& source) override;
80 81
81 scoped_ptr<StreamSocket> CreateTransportClientSocket( 82 scoped_ptr<StreamSocket> CreateTransportClientSocket(
82 const AddressList& addresses, 83 const AddressList& addresses,
84 SocketPerformanceWatcherFactory* /* socket_performance_watcher_factory */,
83 NetLog* /* net_log */, 85 NetLog* /* net_log */,
84 const NetLog::Source& /* source */) override; 86 const NetLog::Source& /* source */) override;
85 87
86 scoped_ptr<SSLClientSocket> CreateSSLClientSocket( 88 scoped_ptr<SSLClientSocket> CreateSSLClientSocket(
87 scoped_ptr<ClientSocketHandle> transport_socket, 89 scoped_ptr<ClientSocketHandle> transport_socket,
88 const HostPortPair& host_and_port, 90 const HostPortPair& host_and_port,
89 const SSLConfig& ssl_config, 91 const SSLConfig& ssl_config,
90 const SSLClientSocketContext& context) override; 92 const SSLClientSocketContext& context) override;
91 93
92 void ClearSSLSessionCache() override; 94 void ClearSSLSessionCache() override;
(...skipping 28 matching lines...) Expand all
121 base::TimeDelta delay_; 123 base::TimeDelta delay_;
122 std::queue<base::Closure> triggerable_sockets_; 124 std::queue<base::Closure> triggerable_sockets_;
123 base::Closure run_loop_quit_closure_; 125 base::Closure run_loop_quit_closure_;
124 126
125 DISALLOW_COPY_AND_ASSIGN(MockTransportClientSocketFactory); 127 DISALLOW_COPY_AND_ASSIGN(MockTransportClientSocketFactory);
126 }; 128 };
127 129
128 } // namespace net 130 } // namespace net
129 131
130 #endif // NET_SOCKET_TRANSPORT_CLIENT_SOCKET_POOL_TEST_UTIL_H_ 132 #endif // NET_SOCKET_TRANSPORT_CLIENT_SOCKET_POOL_TEST_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698