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

Unified Diff: net/socket/ssl_server_socket_nss.h

Issue 7054010: Update SSLServerSocket to provide the net::StreamSocket interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix function signature for OpenSSL build. Created 9 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 side-by-side diff with in-line comments
Download patch
Index: net/socket/ssl_server_socket_nss.h
diff --git a/net/socket/ssl_server_socket_nss.h b/net/socket/ssl_server_socket_nss.h
index 7953c38bf2b18b89014f5f053e51f778bf3c67b8..b51b2cf454dd90e6f9827a4388065d901fc21aa4 100644
--- a/net/socket/ssl_server_socket_nss.h
+++ b/net/socket/ssl_server_socket_nss.h
@@ -21,27 +21,36 @@
namespace net {
-class SSLServerSocketNSS : public SSLServerSocket {
+class SSLServerSocketNSS : public StreamSocket {
public:
- // This object takes ownership of the following parameters:
- // |socket| - A socket that is already connected.
- // |cert| - The certificate to be used by the server.
- //
- // The following parameters are copied in the constructor.
- // |ssl_config| - Options for SSL socket.
- // |key| - The private key used by the server.
- SSLServerSocketNSS(Socket* transport_socket,
- scoped_refptr<X509Certificate> cert,
+ // See comments on CreateSSLServerSocket for details of how these
+ // parameters are used.
+ SSLServerSocketNSS(StreamSocket* socket,
+ scoped_refptr<X509Certificate> certificate,
crypto::RSAPrivateKey* key,
const SSLConfig& ssl_config);
virtual ~SSLServerSocketNSS();
- // SSLServerSocket implementation.
- virtual int Accept(CompletionCallback* callback);
+ // StreamSocket interface.
+ virtual int Connect(CompletionCallback* callback);
virtual int Read(IOBuffer* buf, int buf_len,
CompletionCallback* callback);
virtual int Write(IOBuffer* buf, int buf_len,
CompletionCallback* callback);
+ virtual void Disconnect();
+ virtual bool IsConnected() const;
+ virtual bool IsConnectedAndIdle() const;
+
+ // StreamSocket calls passed straight to underlying stream.
wtc 2011/06/02 19:48:24 Nit: add "socket" after "stream". Alternatively,
Wez 2011/06/02 22:06:01 Done.
+ virtual int GetPeerAddress(AddressList* address) const;
+ virtual int GetLocalAddress(IPEndPoint* address) const;
+ virtual const BoundNetLog& NetLog() const;
+ virtual void SetSubresourceSpeculation();
+ virtual void SetOmniboxSpeculation();
+ virtual bool WasEverUsed() const;
+ virtual bool UsingTCPFastOpen() const;
+
+ // SSLServerSocket specific calls.
virtual bool SetReceiveBufferSize(int32 size);
virtual bool SetSendBufferSize(int32 size);
wtc 2011/06/02 19:48:24 These probably should also be forwarded to the und
Wez 2011/06/02 22:06:01 Done.
@@ -69,7 +78,7 @@ class SSLServerSocketNSS : public SSLServerSocket {
int DoReadLoop(int result);
int DoWriteLoop(int result);
int DoHandshake();
- void DoAcceptCallback(int result);
+ void DoConnectCallback(int result);
void DoReadCallback(int result);
void DoWriteCallback(int result);
@@ -91,7 +100,7 @@ class SSLServerSocketNSS : public SSLServerSocket {
BoundNetLog net_log_;
- CompletionCallback* user_accept_callback_;
+ CompletionCallback* user_connect_callback_;
CompletionCallback* user_read_callback_;
CompletionCallback* user_write_callback_;
@@ -110,7 +119,7 @@ class SSLServerSocketNSS : public SSLServerSocket {
memio_Private* nss_bufs_;
// Socket for sending and receiving data.
wtc 2011/06/02 19:48:24 Nit: Socket => StreamSocket
Wez 2011/06/02 22:06:01 Done.
- scoped_ptr<Socket> transport_socket_;
+ scoped_ptr<StreamSocket> transport_socket_;
// Options for the SSL socket.
// TODO(hclam): This memeber is currently not used. Should make use of this

Powered by Google App Engine
This is Rietveld 408576698