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

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

Issue 8801005: base::Bind: Convert Socket::Read. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review fixes. 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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 virtual void SetOmniboxSpeculation() OVERRIDE; 83 virtual void SetOmniboxSpeculation() OVERRIDE;
84 virtual bool WasEverUsed() const OVERRIDE; 84 virtual bool WasEverUsed() const OVERRIDE;
85 virtual bool UsingTCPFastOpen() const OVERRIDE; 85 virtual bool UsingTCPFastOpen() const OVERRIDE;
86 virtual int64 NumBytesRead() const OVERRIDE; 86 virtual int64 NumBytesRead() const OVERRIDE;
87 virtual base::TimeDelta GetConnectTimeMicros() const OVERRIDE; 87 virtual base::TimeDelta GetConnectTimeMicros() const OVERRIDE;
88 88
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,
94 int buf_len,
95 const CompletionCallback& callback) OVERRIDE;
93 virtual int Write(IOBuffer* buf, 96 virtual int Write(IOBuffer* buf,
94 int buf_len, 97 int buf_len,
95 OldCompletionCallback* callback) OVERRIDE; 98 OldCompletionCallback* callback) OVERRIDE;
96 virtual bool SetReceiveBufferSize(int32 size) OVERRIDE; 99 virtual bool SetReceiveBufferSize(int32 size) OVERRIDE;
97 virtual bool SetSendBufferSize(int32 size) OVERRIDE; 100 virtual bool SetSendBufferSize(int32 size) OVERRIDE;
98 101
99 private: 102 private:
100 enum State { 103 enum State {
101 STATE_NONE, 104 STATE_NONE,
102 STATE_LOAD_SSL_HOST_INFO, 105 STATE_LOAD_SSL_HOST_INFO,
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 base::OneShotTimer<SSLClientSocketNSS> uncork_timer_; 224 base::OneShotTimer<SSLClientSocketNSS> uncork_timer_;
222 scoped_refptr<IOBuffer> recv_buffer_; 225 scoped_refptr<IOBuffer> recv_buffer_;
223 226
224 CompletionCallback handshake_io_callback_; 227 CompletionCallback handshake_io_callback_;
225 scoped_ptr<ClientSocketHandle> transport_; 228 scoped_ptr<ClientSocketHandle> transport_;
226 HostPortPair host_and_port_; 229 HostPortPair host_and_port_;
227 SSLConfig ssl_config_; 230 SSLConfig ssl_config_;
228 231
229 OldCompletionCallback* old_user_connect_callback_; 232 OldCompletionCallback* old_user_connect_callback_;
230 CompletionCallback user_connect_callback_; 233 CompletionCallback user_connect_callback_;
231 OldCompletionCallback* user_read_callback_; 234 OldCompletionCallback* old_user_read_callback_;
235 CompletionCallback user_read_callback_;
232 OldCompletionCallback* user_write_callback_; 236 OldCompletionCallback* user_write_callback_;
233 237
234 // Used by Read function. 238 // Used by Read function.
235 scoped_refptr<IOBuffer> user_read_buf_; 239 scoped_refptr<IOBuffer> user_read_buf_;
236 int user_read_buf_len_; 240 int user_read_buf_len_;
237 241
238 // Used by Write function. 242 // Used by Write function.
239 scoped_refptr<IOBuffer> user_write_buf_; 243 scoped_refptr<IOBuffer> user_write_buf_;
240 int user_write_buf_len_; 244 int user_write_buf_len_;
241 245
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 // Added the following code Debugging in release mode. 318 // Added the following code Debugging in release mode.
315 mutable base::Lock lock_; 319 mutable base::Lock lock_;
316 // This is mutable so that CalledOnValidThread can set it. 320 // This is mutable so that CalledOnValidThread can set it.
317 // It's guarded by |lock_|. 321 // It's guarded by |lock_|.
318 mutable base::PlatformThreadId valid_thread_id_; 322 mutable base::PlatformThreadId valid_thread_id_;
319 }; 323 };
320 324
321 } // namespace net 325 } // namespace net
322 326
323 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_NSS_H_ 327 #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