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

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

Issue 8831001: base::Bind: Convert Socket::Write. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix alignment. 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_mac.cc ('k') | net/socket/ssl_client_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_CLIENT_SOCKET_NSS_H_ 5 #ifndef NET_SOCKET_SSL_CLIENT_SOCKET_NSS_H_
6 #define NET_SOCKET_SSL_CLIENT_SOCKET_NSS_H_ 6 #define NET_SOCKET_SSL_CLIENT_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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 // Socket implementation. 89 // Socket implementation.
90 virtual int Read(IOBuffer* buf, 90 virtual int Read(IOBuffer* buf,
91 int buf_len, 91 int buf_len,
92 OldCompletionCallback* callback) OVERRIDE; 92 OldCompletionCallback* callback) OVERRIDE;
93 virtual int Read(IOBuffer* buf, 93 virtual int Read(IOBuffer* buf,
94 int buf_len, 94 int buf_len,
95 const CompletionCallback& callback) OVERRIDE; 95 const CompletionCallback& callback) OVERRIDE;
96 virtual int Write(IOBuffer* buf, 96 virtual int Write(IOBuffer* buf,
97 int buf_len, 97 int buf_len,
98 OldCompletionCallback* callback) OVERRIDE; 98 OldCompletionCallback* callback) OVERRIDE;
99 virtual int Write(IOBuffer* buf,
100 int buf_len,
101 const CompletionCallback& callback) OVERRIDE;
99 virtual bool SetReceiveBufferSize(int32 size) OVERRIDE; 102 virtual bool SetReceiveBufferSize(int32 size) OVERRIDE;
100 virtual bool SetSendBufferSize(int32 size) OVERRIDE; 103 virtual bool SetSendBufferSize(int32 size) OVERRIDE;
101 104
102 private: 105 private:
103 enum State { 106 enum State {
104 STATE_NONE, 107 STATE_NONE,
105 STATE_LOAD_SSL_HOST_INFO, 108 STATE_LOAD_SSL_HOST_INFO,
106 STATE_HANDSHAKE, 109 STATE_HANDSHAKE,
107 STATE_GET_OB_CERT_COMPLETE, 110 STATE_GET_OB_CERT_COMPLETE,
108 STATE_VERIFY_DNSSEC, 111 STATE_VERIFY_DNSSEC,
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 229
227 CompletionCallback handshake_io_callback_; 230 CompletionCallback handshake_io_callback_;
228 scoped_ptr<ClientSocketHandle> transport_; 231 scoped_ptr<ClientSocketHandle> transport_;
229 HostPortPair host_and_port_; 232 HostPortPair host_and_port_;
230 SSLConfig ssl_config_; 233 SSLConfig ssl_config_;
231 234
232 OldCompletionCallback* old_user_connect_callback_; 235 OldCompletionCallback* old_user_connect_callback_;
233 CompletionCallback user_connect_callback_; 236 CompletionCallback user_connect_callback_;
234 OldCompletionCallback* old_user_read_callback_; 237 OldCompletionCallback* old_user_read_callback_;
235 CompletionCallback user_read_callback_; 238 CompletionCallback user_read_callback_;
236 OldCompletionCallback* user_write_callback_; 239 OldCompletionCallback* old_user_write_callback_;
240 CompletionCallback user_write_callback_;
237 241
238 // Used by Read function. 242 // Used by Read function.
239 scoped_refptr<IOBuffer> user_read_buf_; 243 scoped_refptr<IOBuffer> user_read_buf_;
240 int user_read_buf_len_; 244 int user_read_buf_len_;
241 245
242 // Used by Write function. 246 // Used by Write function.
243 scoped_refptr<IOBuffer> user_write_buf_; 247 scoped_refptr<IOBuffer> user_write_buf_;
244 int user_write_buf_len_; 248 int user_write_buf_len_;
245 249
246 // Set when handshake finishes. The server certificate is first received 250 // Set when handshake finishes. The server certificate is first received
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 // Added the following code Debugging in release mode. 322 // Added the following code Debugging in release mode.
319 mutable base::Lock lock_; 323 mutable base::Lock lock_;
320 // This is mutable so that CalledOnValidThread can set it. 324 // This is mutable so that CalledOnValidThread can set it.
321 // It's guarded by |lock_|. 325 // It's guarded by |lock_|.
322 mutable base::PlatformThreadId valid_thread_id_; 326 mutable base::PlatformThreadId valid_thread_id_;
323 }; 327 };
324 328
325 } // namespace net 329 } // namespace net
326 330
327 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_NSS_H_ 331 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_NSS_H_
OLDNEW
« no previous file with comments | « net/socket/ssl_client_socket_mac.cc ('k') | net/socket/ssl_client_socket_nss.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698