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

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

Issue 1096203006: Collect all ConnectionAttempts from both sockets in TransportConnectJob. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@domrel_serverip1
Patch Set: Return fake ConnectionAttempt in MockTCPClientSocket Created 5 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
« no previous file with comments | « net/socket/connection_attempts.h ('k') | net/socket/socket_test_util.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 7
8 #include <cstring> 8 #include <cstring>
9 #include <deque> 9 #include <deque>
10 #include <string> 10 #include <string>
(...skipping 761 matching lines...) Expand 10 before | Expand all | Expand 10 after
772 // StreamSocket implementation. 772 // StreamSocket implementation.
773 int Connect(const CompletionCallback& callback) override = 0; 773 int Connect(const CompletionCallback& callback) override = 0;
774 void Disconnect() override; 774 void Disconnect() override;
775 bool IsConnected() const override; 775 bool IsConnected() const override;
776 bool IsConnectedAndIdle() const override; 776 bool IsConnectedAndIdle() const override;
777 int GetPeerAddress(IPEndPoint* address) const override; 777 int GetPeerAddress(IPEndPoint* address) const override;
778 int GetLocalAddress(IPEndPoint* address) const override; 778 int GetLocalAddress(IPEndPoint* address) const override;
779 const BoundNetLog& NetLog() const override; 779 const BoundNetLog& NetLog() const override;
780 void SetSubresourceSpeculation() override {} 780 void SetSubresourceSpeculation() override {}
781 void SetOmniboxSpeculation() override {} 781 void SetOmniboxSpeculation() override {}
782 void GetConnectionAttempts(ConnectionAttempts* out) const override;
783 void ClearConnectionAttempts() override {}
784 void AddConnectionAttempts(const ConnectionAttempts& attempts) override {}
782 785
783 // SSLClientSocket implementation. 786 // SSLClientSocket implementation.
784 void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) override; 787 void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) override;
785 int ExportKeyingMaterial(const base::StringPiece& label, 788 int ExportKeyingMaterial(const base::StringPiece& label,
786 bool has_context, 789 bool has_context,
787 const base::StringPiece& context, 790 const base::StringPiece& context,
788 unsigned char* out, 791 unsigned char* out,
789 unsigned int outlen) override; 792 unsigned int outlen) override;
790 int GetTLSUniqueChannelBinding(std::string* out) override; 793 int GetTLSUniqueChannelBinding(std::string* out) override;
791 NextProtoStatus GetNextProto(std::string* proto) const override; 794 NextProtoStatus GetNextProto(std::string* proto) const override;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
834 // StreamSocket implementation. 837 // StreamSocket implementation.
835 int Connect(const CompletionCallback& callback) override; 838 int Connect(const CompletionCallback& callback) override;
836 void Disconnect() override; 839 void Disconnect() override;
837 bool IsConnected() const override; 840 bool IsConnected() const override;
838 bool IsConnectedAndIdle() const override; 841 bool IsConnectedAndIdle() const override;
839 int GetPeerAddress(IPEndPoint* address) const override; 842 int GetPeerAddress(IPEndPoint* address) const override;
840 bool WasEverUsed() const override; 843 bool WasEverUsed() const override;
841 bool UsingTCPFastOpen() const override; 844 bool UsingTCPFastOpen() const override;
842 bool WasNpnNegotiated() const override; 845 bool WasNpnNegotiated() const override;
843 bool GetSSLInfo(SSLInfo* ssl_info) override; 846 bool GetSSLInfo(SSLInfo* ssl_info) override;
847 void GetConnectionAttempts(ConnectionAttempts* out) const override;
848 void ClearConnectionAttempts() override;
849 void AddConnectionAttempts(const ConnectionAttempts& attempts) override;
844 850
845 // AsyncSocket: 851 // AsyncSocket:
846 void OnReadComplete(const MockRead& data) override; 852 void OnReadComplete(const MockRead& data) override;
847 void OnWriteComplete(int rv) override; 853 void OnWriteComplete(int rv) override;
848 void OnConnectComplete(const MockConnect& data) override; 854 void OnConnectComplete(const MockConnect& data) override;
849 855
850 private: 856 private:
851 int CompleteRead(); 857 int CompleteRead();
852 858
853 AddressList addresses_; 859 AddressList addresses_;
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after
1378 1384
1379 extern const char kSOCKS5OkRequest[]; 1385 extern const char kSOCKS5OkRequest[];
1380 extern const int kSOCKS5OkRequestLength; 1386 extern const int kSOCKS5OkRequestLength;
1381 1387
1382 extern const char kSOCKS5OkResponse[]; 1388 extern const char kSOCKS5OkResponse[];
1383 extern const int kSOCKS5OkResponseLength; 1389 extern const int kSOCKS5OkResponseLength;
1384 1390
1385 } // namespace net 1391 } // namespace net
1386 1392
1387 #endif // NET_SOCKET_SOCKET_TEST_UTIL_H_ 1393 #endif // NET_SOCKET_SOCKET_TEST_UTIL_H_
OLDNEW
« no previous file with comments | « net/socket/connection_attempts.h ('k') | net/socket/socket_test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698