diff options
author | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-10 22:13:46 +0000 |
---|---|---|
committer | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-10 22:13:46 +0000 |
commit | 2d6e778368680b39f71e000ee03ce3430b96507a (patch) | |
tree | 1ee8495bd25760f5e9cd471594dc413190351b33 /net/socket/tcp_client_socket_libevent.h | |
parent | bb339ae418909bc5325b1695f6b96bcb9d5370e7 (diff) | |
download | chromium_src-2d6e778368680b39f71e000ee03ce3430b96507a.zip chromium_src-2d6e778368680b39f71e000ee03ce3430b96507a.tar.gz chromium_src-2d6e778368680b39f71e000ee03ce3430b96507a.tar.bz2 |
net: assorted changes needed for Snap Start tests.
In IsAllowedBadCert, the pointer compare doesn't always work. Creating a
certificate by X509Certificate::CreateFromBytes and putting it in the
allowed bad list doesn't match the same certificate from a server.
InvalidateSessionIfBadCertificate: I'm sure that there's history here
that I don't know, so please review carefully. In order to test
resumption against a server with a test certificate we need to avoid
destroying the session.
ClearSessionCache, AdoptSocket: only for testing
BUG=none
TEST=none
http://codereview.chromium.org/4558004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65713 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/socket/tcp_client_socket_libevent.h')
-rw-r--r-- | net/socket/tcp_client_socket_libevent.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/net/socket/tcp_client_socket_libevent.h b/net/socket/tcp_client_socket_libevent.h index 890d0c2..a89c5b3 100644 --- a/net/socket/tcp_client_socket_libevent.h +++ b/net/socket/tcp_client_socket_libevent.h @@ -33,6 +33,12 @@ class TCPClientSocketLibevent : public ClientSocket, NonThreadSafe { virtual ~TCPClientSocketLibevent(); + // AdoptSocket causes the given, connected socket to be adopted as a TCP + // socket. This object must not be connected. This object takes ownership of + // the given socket and then acts as if Connect() had been called. This + // function is intended for testing only. + void AdoptSocket(int socket); + // ClientSocket methods: virtual int Connect(CompletionCallback* callback); virtual void Disconnect(); @@ -125,6 +131,9 @@ class TCPClientSocketLibevent : public ClientSocket, NonThreadSafe { // Returns the OS error code (or 0 on success). int CreateSocket(const struct addrinfo* ai); + // Returns the OS error code (or 0 on success). + int SetupSocket(); + // Helper to add a TCP_CONNECT (end) event to the NetLog. void LogConnectCompletion(int net_error); |