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

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

Issue 8801005: base::Bind: Convert Socket::Read. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
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 23 matching lines...) Expand all
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; 43 OldCompletionCallback* callback) OVERRIDE;
44 virtual int Read(IOBuffer* buf, int buf_len,
45 const CompletionCallback& callback) OVERRIDE;
44 virtual int Write(IOBuffer* buf, int buf_len, 46 virtual int Write(IOBuffer* buf, int buf_len,
45 OldCompletionCallback* callback) OVERRIDE; 47 OldCompletionCallback* callback) OVERRIDE;
46 virtual bool SetReceiveBufferSize(int32 size) OVERRIDE; 48 virtual bool SetReceiveBufferSize(int32 size) OVERRIDE;
47 virtual bool SetSendBufferSize(int32 size) OVERRIDE; 49 virtual bool SetSendBufferSize(int32 size) OVERRIDE;
48 50
49 // StreamSocket implementation. 51 // StreamSocket implementation.
50 virtual int Connect(OldCompletionCallback* callback) OVERRIDE; 52 virtual int Connect(OldCompletionCallback* callback) OVERRIDE;
51 virtual int Connect(const CompletionCallback& callback) OVERRIDE; 53 virtual int Connect(const CompletionCallback& callback) OVERRIDE;
52 virtual void Disconnect() OVERRIDE; 54 virtual void Disconnect() OVERRIDE;
53 virtual bool IsConnected() const OVERRIDE; 55 virtual bool IsConnected() const OVERRIDE;
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 OldCompletionCallbackImpl<SSLServerSocketNSS> buffer_send_callback_; 104 OldCompletionCallbackImpl<SSLServerSocketNSS> buffer_send_callback_;
103 OldCompletionCallbackImpl<SSLServerSocketNSS> buffer_recv_callback_; 105 OldCompletionCallbackImpl<SSLServerSocketNSS> buffer_recv_callback_;
104 bool transport_send_busy_; 106 bool transport_send_busy_;
105 bool transport_recv_busy_; 107 bool transport_recv_busy_;
106 108
107 scoped_refptr<IOBuffer> recv_buffer_; 109 scoped_refptr<IOBuffer> recv_buffer_;
108 110
109 BoundNetLog net_log_; 111 BoundNetLog net_log_;
110 112
111 OldCompletionCallback* user_handshake_callback_; 113 OldCompletionCallback* user_handshake_callback_;
112 OldCompletionCallback* user_read_callback_; 114 OldCompletionCallback* old_user_read_callback_;
115 CompletionCallback user_read_callback_;
113 OldCompletionCallback* user_write_callback_; 116 OldCompletionCallback* user_write_callback_;
114 117
115 // Used by Read function. 118 // Used by Read function.
116 scoped_refptr<IOBuffer> user_read_buf_; 119 scoped_refptr<IOBuffer> user_read_buf_;
117 int user_read_buf_len_; 120 int user_read_buf_len_;
118 121
119 // Used by Write function. 122 // Used by Write function.
120 scoped_refptr<IOBuffer> user_write_buf_; 123 scoped_refptr<IOBuffer> user_write_buf_;
121 int user_write_buf_len_; 124 int user_write_buf_len_;
122 125
(...skipping 17 matching lines...) Expand all
140 143
141 State next_handshake_state_; 144 State next_handshake_state_;
142 bool completed_handshake_; 145 bool completed_handshake_;
143 146
144 DISALLOW_COPY_AND_ASSIGN(SSLServerSocketNSS); 147 DISALLOW_COPY_AND_ASSIGN(SSLServerSocketNSS);
145 }; 148 };
146 149
147 } // namespace net 150 } // namespace net
148 151
149 #endif // NET_SOCKET_SSL_SERVER_SOCKET_NSS_H_ 152 #endif // NET_SOCKET_SSL_SERVER_SOCKET_NSS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698