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

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

Issue 8824006: Migrate net/socket/socket.h, net/socket/stream_socket.h to base::Bind(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 9 years 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/socket/ssl_client_socket_win.cc ('k') | net/socket/ssl_server_socket_nss.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_SSL_SERVER_SOCKET_NSS_H_ 5 #ifndef NET_SOCKET_SSL_SERVER_SOCKET_NSS_H_
6 #define NET_SOCKET_SSL_SERVER_SOCKET_NSS_H_ 6 #define NET_SOCKET_SSL_SERVER_SOCKET_NSS_H_
7 #pragma once 7 #pragma once
8 8
9 #include <certt.h> 9 #include <certt.h>
10 #include <keyt.h> 10 #include <keyt.h>
(...skipping 22 matching lines...) Expand all
33 33
34 // SSLServerSocket interface. 34 // SSLServerSocket interface.
35 virtual int Handshake(OldCompletionCallback* callback) OVERRIDE; 35 virtual int Handshake(OldCompletionCallback* callback) OVERRIDE;
36 virtual int ExportKeyingMaterial(const base::StringPiece& label, 36 virtual int ExportKeyingMaterial(const base::StringPiece& label,
37 const base::StringPiece& context, 37 const base::StringPiece& context,
38 unsigned char *out, 38 unsigned char *out,
39 unsigned int outlen) OVERRIDE; 39 unsigned int outlen) OVERRIDE;
40 40
41 // Socket interface (via StreamSocket). 41 // Socket interface (via StreamSocket).
42 virtual int Read(IOBuffer* buf, int buf_len, 42 virtual int Read(IOBuffer* buf, int buf_len,
43 OldCompletionCallback* callback) OVERRIDE;
44 virtual int Read(IOBuffer* buf, int buf_len,
45 const CompletionCallback& callback) OVERRIDE; 43 const CompletionCallback& callback) OVERRIDE;
46 virtual int Write(IOBuffer* buf, int buf_len, 44 virtual int Write(IOBuffer* buf, int buf_len,
47 OldCompletionCallback* callback) OVERRIDE; 45 const CompletionCallback& callback) OVERRIDE;
48 virtual bool SetReceiveBufferSize(int32 size) OVERRIDE; 46 virtual bool SetReceiveBufferSize(int32 size) OVERRIDE;
49 virtual bool SetSendBufferSize(int32 size) OVERRIDE; 47 virtual bool SetSendBufferSize(int32 size) OVERRIDE;
50 48
51 // StreamSocket implementation. 49 // StreamSocket implementation.
52 virtual int Connect(OldCompletionCallback* callback) OVERRIDE;
53 virtual int Connect(const CompletionCallback& callback) OVERRIDE; 50 virtual int Connect(const CompletionCallback& callback) OVERRIDE;
54 virtual void Disconnect() OVERRIDE; 51 virtual void Disconnect() OVERRIDE;
55 virtual bool IsConnected() const OVERRIDE; 52 virtual bool IsConnected() const OVERRIDE;
56 virtual bool IsConnectedAndIdle() const OVERRIDE; 53 virtual bool IsConnectedAndIdle() const OVERRIDE;
57 virtual int GetPeerAddress(AddressList* address) const OVERRIDE; 54 virtual int GetPeerAddress(AddressList* address) const OVERRIDE;
58 virtual int GetLocalAddress(IPEndPoint* address) const OVERRIDE; 55 virtual int GetLocalAddress(IPEndPoint* address) const OVERRIDE;
59 virtual const BoundNetLog& NetLog() const OVERRIDE; 56 virtual const BoundNetLog& NetLog() const OVERRIDE;
60 virtual void SetSubresourceSpeculation() OVERRIDE; 57 virtual void SetSubresourceSpeculation() OVERRIDE;
61 virtual void SetOmniboxSpeculation() OVERRIDE; 58 virtual void SetOmniboxSpeculation() OVERRIDE;
62 virtual bool WasEverUsed() const OVERRIDE; 59 virtual bool WasEverUsed() const OVERRIDE;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 91
95 static SECStatus OwnAuthCertHandler(void* arg, 92 static SECStatus OwnAuthCertHandler(void* arg,
96 PRFileDesc* socket, 93 PRFileDesc* socket,
97 PRBool checksig, 94 PRBool checksig,
98 PRBool is_server); 95 PRBool is_server);
99 static void HandshakeCallback(PRFileDesc* socket, void* arg); 96 static void HandshakeCallback(PRFileDesc* socket, void* arg);
100 97
101 virtual int Init(); 98 virtual int Init();
102 99
103 // Members used to send and receive buffer. 100 // Members used to send and receive buffer.
104 OldCompletionCallbackImpl<SSLServerSocketNSS> buffer_send_callback_;
105 OldCompletionCallbackImpl<SSLServerSocketNSS> buffer_recv_callback_;
106 bool transport_send_busy_; 101 bool transport_send_busy_;
107 bool transport_recv_busy_; 102 bool transport_recv_busy_;
108 103
109 scoped_refptr<IOBuffer> recv_buffer_; 104 scoped_refptr<IOBuffer> recv_buffer_;
110 105
111 BoundNetLog net_log_; 106 BoundNetLog net_log_;
112 107
113 OldCompletionCallback* user_handshake_callback_; 108 OldCompletionCallback* user_handshake_callback_;
114 OldCompletionCallback* old_user_read_callback_;
115 CompletionCallback user_read_callback_; 109 CompletionCallback user_read_callback_;
116 OldCompletionCallback* user_write_callback_; 110 CompletionCallback user_write_callback_;
117 111
118 // Used by Read function. 112 // Used by Read function.
119 scoped_refptr<IOBuffer> user_read_buf_; 113 scoped_refptr<IOBuffer> user_read_buf_;
120 int user_read_buf_len_; 114 int user_read_buf_len_;
121 115
122 // Used by Write function. 116 // Used by Write function.
123 scoped_refptr<IOBuffer> user_write_buf_; 117 scoped_refptr<IOBuffer> user_write_buf_;
124 int user_write_buf_len_; 118 int user_write_buf_len_;
125 119
126 // The NSS SSL state machine 120 // The NSS SSL state machine
(...skipping 16 matching lines...) Expand all
143 137
144 State next_handshake_state_; 138 State next_handshake_state_;
145 bool completed_handshake_; 139 bool completed_handshake_;
146 140
147 DISALLOW_COPY_AND_ASSIGN(SSLServerSocketNSS); 141 DISALLOW_COPY_AND_ASSIGN(SSLServerSocketNSS);
148 }; 142 };
149 143
150 } // namespace net 144 } // namespace net
151 145
152 #endif // NET_SOCKET_SSL_SERVER_SOCKET_NSS_H_ 146 #endif // NET_SOCKET_SSL_SERVER_SOCKET_NSS_H_
OLDNEW
« no previous file with comments | « net/socket/ssl_client_socket_win.cc ('k') | net/socket/ssl_server_socket_nss.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698