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

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

Issue 1376473003: Notify NQE of TCP RTT values (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased, addressed sleevi comments 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef NET_SOCKET_SOCKET_TEST_UTIL_H_ 5 #ifndef NET_SOCKET_SOCKET_TEST_UTIL_H_
6 #define NET_SOCKET_SOCKET_TEST_UTIL_H_ 6 #define NET_SOCKET_SOCKET_TEST_UTIL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
11 #include <cstring> 11 #include <cstring>
12 #include <deque> 12 #include <deque>
13 #include <string> 13 #include <string>
14 #include <vector> 14 #include <vector>
15 15
16 #include "base/callback.h" 16 #include "base/callback.h"
17 #include "base/logging.h" 17 #include "base/logging.h"
18 #include "base/macros.h" 18 #include "base/macros.h"
19 #include "base/memory/ref_counted.h" 19 #include "base/memory/ref_counted.h"
20 #include "base/memory/scoped_ptr.h" 20 #include "base/memory/scoped_ptr.h"
21 #include "base/memory/scoped_vector.h" 21 #include "base/memory/scoped_vector.h"
22 #include "base/memory/weak_ptr.h" 22 #include "base/memory/weak_ptr.h"
23 #include "base/strings/string16.h" 23 #include "base/strings/string16.h"
24 #include "base/time/time.h" 24 #include "base/time/time.h"
25 #include "net/base/address_list.h" 25 #include "net/base/address_list.h"
26 #include "net/base/io_buffer.h" 26 #include "net/base/io_buffer.h"
27 #include "net/base/net_errors.h" 27 #include "net/base/net_errors.h"
28 #include "net/base/socket_performance_watcher.h"
28 #include "net/base/test_completion_callback.h" 29 #include "net/base/test_completion_callback.h"
29 #include "net/http/http_auth_controller.h" 30 #include "net/http/http_auth_controller.h"
30 #include "net/http/http_proxy_client_socket_pool.h" 31 #include "net/http/http_proxy_client_socket_pool.h"
31 #include "net/log/net_log.h" 32 #include "net/log/net_log.h"
32 #include "net/socket/client_socket_factory.h" 33 #include "net/socket/client_socket_factory.h"
33 #include "net/socket/client_socket_handle.h" 34 #include "net/socket/client_socket_handle.h"
34 #include "net/socket/connection_attempts.h" 35 #include "net/socket/connection_attempts.h"
35 #include "net/socket/socks_client_socket_pool.h" 36 #include "net/socket/socks_client_socket_pool.h"
36 #include "net/socket/ssl_client_socket.h" 37 #include "net/socket/ssl_client_socket.h"
37 #include "net/socket/ssl_client_socket_pool.h" 38 #include "net/socket/ssl_client_socket_pool.h"
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
513 } 514 }
514 515
515 // ClientSocketFactory 516 // ClientSocketFactory
516 scoped_ptr<DatagramClientSocket> CreateDatagramClientSocket( 517 scoped_ptr<DatagramClientSocket> CreateDatagramClientSocket(
517 DatagramSocket::BindType bind_type, 518 DatagramSocket::BindType bind_type,
518 const RandIntCallback& rand_int_cb, 519 const RandIntCallback& rand_int_cb,
519 NetLog* net_log, 520 NetLog* net_log,
520 const NetLog::Source& source) override; 521 const NetLog::Source& source) override;
521 scoped_ptr<StreamSocket> CreateTransportClientSocket( 522 scoped_ptr<StreamSocket> CreateTransportClientSocket(
522 const AddressList& addresses, 523 const AddressList& addresses,
524 scoped_ptr<SocketPerformanceWatcher> socket_performance_watcher,
523 NetLog* net_log, 525 NetLog* net_log,
524 const NetLog::Source& source) override; 526 const NetLog::Source& source) override;
525 scoped_ptr<SSLClientSocket> CreateSSLClientSocket( 527 scoped_ptr<SSLClientSocket> CreateSSLClientSocket(
526 scoped_ptr<ClientSocketHandle> transport_socket, 528 scoped_ptr<ClientSocketHandle> transport_socket,
527 const HostPortPair& host_and_port, 529 const HostPortPair& host_and_port,
528 const SSLConfig& ssl_config, 530 const SSLConfig& ssl_config,
529 const SSLClientSocketContext& context) override; 531 const SSLClientSocketContext& context) override;
530 void ClearSSLSessionCache() override; 532 void ClearSSLSessionCache() override;
531 533
532 const std::vector<uint16_t>& udp_client_socket_ports() const { 534 const std::vector<uint16_t>& udp_client_socket_ports() const {
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after
1001 1003
1002 // Helper function to get the total data size of the MockReads in |reads|. 1004 // Helper function to get the total data size of the MockReads in |reads|.
1003 int64_t CountReadBytes(const MockRead reads[], size_t reads_size); 1005 int64_t CountReadBytes(const MockRead reads[], size_t reads_size);
1004 1006
1005 // Helper function to get the total data size of the MockWrites in |writes|. 1007 // Helper function to get the total data size of the MockWrites in |writes|.
1006 int64_t CountWriteBytes(const MockWrite writes[], size_t writes_size); 1008 int64_t CountWriteBytes(const MockWrite writes[], size_t writes_size);
1007 1009
1008 } // namespace net 1010 } // namespace net
1009 1011
1010 #endif // NET_SOCKET_SOCKET_TEST_UTIL_H_ 1012 #endif // NET_SOCKET_SOCKET_TEST_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698