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

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

Issue 10309002: Reimplements net::AddressList without struct addrinfo. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: get_canonical_name -> canonical_name. iterator to indexing Created 8 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « net/proxy/proxy_resolver_js_bindings_unittest.cc ('k') | net/socket/socks5_client_socket.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #pragma once 7 #pragma once
8 8
9 #include <cstring> 9 #include <cstring>
10 #include <deque> 10 #include <deque>
(...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after
620 620
621 BoundNetLog net_log_; 621 BoundNetLog net_log_;
622 }; 622 };
623 623
624 class MockTCPClientSocket : public MockClientSocket, public AsyncSocket { 624 class MockTCPClientSocket : public MockClientSocket, public AsyncSocket {
625 public: 625 public:
626 MockTCPClientSocket(const AddressList& addresses, net::NetLog* net_log, 626 MockTCPClientSocket(const AddressList& addresses, net::NetLog* net_log,
627 SocketDataProvider* socket); 627 SocketDataProvider* socket);
628 virtual ~MockTCPClientSocket(); 628 virtual ~MockTCPClientSocket();
629 629
630 AddressList addresses() const { return addresses_; } 630 const AddressList& addresses() const { return addresses_; }
631 631
632 // Socket implementation. 632 // Socket implementation.
633 virtual int Read(IOBuffer* buf, int buf_len, 633 virtual int Read(IOBuffer* buf, int buf_len,
634 const CompletionCallback& callback) OVERRIDE; 634 const CompletionCallback& callback) OVERRIDE;
635 virtual int Write(IOBuffer* buf, int buf_len, 635 virtual int Write(IOBuffer* buf, int buf_len,
636 const CompletionCallback& callback) OVERRIDE; 636 const CompletionCallback& callback) OVERRIDE;
637 637
638 // StreamSocket implementation. 638 // StreamSocket implementation.
639 virtual int Connect(const CompletionCallback& callback) OVERRIDE; 639 virtual int Connect(const CompletionCallback& callback) OVERRIDE;
640 virtual void Disconnect() OVERRIDE; 640 virtual void Disconnect() OVERRIDE;
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
1047 1047
1048 extern const char kSOCKS5OkRequest[]; 1048 extern const char kSOCKS5OkRequest[];
1049 extern const int kSOCKS5OkRequestLength; 1049 extern const int kSOCKS5OkRequestLength;
1050 1050
1051 extern const char kSOCKS5OkResponse[]; 1051 extern const char kSOCKS5OkResponse[];
1052 extern const int kSOCKS5OkResponseLength; 1052 extern const int kSOCKS5OkResponseLength;
1053 1053
1054 } // namespace net 1054 } // namespace net
1055 1055
1056 #endif // NET_SOCKET_SOCKET_TEST_UTIL_H_ 1056 #endif // NET_SOCKET_SOCKET_TEST_UTIL_H_
OLDNEW
« no previous file with comments | « net/proxy/proxy_resolver_js_bindings_unittest.cc ('k') | net/socket/socks5_client_socket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698