| OLD | NEW |
| 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 virtual void SetOmniboxSpeculation() OVERRIDE; | 82 virtual void SetOmniboxSpeculation() OVERRIDE; |
| 83 virtual bool WasEverUsed() const OVERRIDE; | 83 virtual bool WasEverUsed() const OVERRIDE; |
| 84 virtual bool UsingTCPFastOpen() const OVERRIDE; | 84 virtual bool UsingTCPFastOpen() const OVERRIDE; |
| 85 virtual int64 NumBytesRead() const OVERRIDE; | 85 virtual int64 NumBytesRead() const OVERRIDE; |
| 86 virtual base::TimeDelta GetConnectTimeMicros() const OVERRIDE; | 86 virtual base::TimeDelta GetConnectTimeMicros() const OVERRIDE; |
| 87 | 87 |
| 88 // Socket implementation. | 88 // Socket implementation. |
| 89 virtual int Read(IOBuffer* buf, | 89 virtual int Read(IOBuffer* buf, |
| 90 int buf_len, | 90 int buf_len, |
| 91 OldCompletionCallback* callback) OVERRIDE; | 91 OldCompletionCallback* callback) OVERRIDE; |
| 92 virtual int Read(IOBuffer* buf, |
| 93 int buf_len, |
| 94 const CompletionCallback& callback) OVERRIDE; |
| 92 virtual int Write(IOBuffer* buf, | 95 virtual int Write(IOBuffer* buf, |
| 93 int buf_len, | 96 int buf_len, |
| 94 OldCompletionCallback* callback) OVERRIDE; | 97 OldCompletionCallback* callback) OVERRIDE; |
| 95 virtual bool SetReceiveBufferSize(int32 size) OVERRIDE; | 98 virtual bool SetReceiveBufferSize(int32 size) OVERRIDE; |
| 96 virtual bool SetSendBufferSize(int32 size) OVERRIDE; | 99 virtual bool SetSendBufferSize(int32 size) OVERRIDE; |
| 97 | 100 |
| 98 private: | 101 private: |
| 99 enum State { | 102 enum State { |
| 100 STATE_NONE, | 103 STATE_NONE, |
| 101 STATE_LOAD_SSL_HOST_INFO, | 104 STATE_LOAD_SSL_HOST_INFO, |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 base::OneShotTimer<SSLClientSocketNSS> uncork_timer_; | 221 base::OneShotTimer<SSLClientSocketNSS> uncork_timer_; |
| 219 scoped_refptr<IOBuffer> recv_buffer_; | 222 scoped_refptr<IOBuffer> recv_buffer_; |
| 220 | 223 |
| 221 CompletionCallback handshake_io_callback_; | 224 CompletionCallback handshake_io_callback_; |
| 222 scoped_ptr<ClientSocketHandle> transport_; | 225 scoped_ptr<ClientSocketHandle> transport_; |
| 223 HostPortPair host_and_port_; | 226 HostPortPair host_and_port_; |
| 224 SSLConfig ssl_config_; | 227 SSLConfig ssl_config_; |
| 225 | 228 |
| 226 OldCompletionCallback* old_user_connect_callback_; | 229 OldCompletionCallback* old_user_connect_callback_; |
| 227 CompletionCallback user_connect_callback_; | 230 CompletionCallback user_connect_callback_; |
| 228 OldCompletionCallback* user_read_callback_; | 231 OldCompletionCallback* old_user_read_callback_; |
| 232 CompletionCallback user_read_callback_; |
| 229 OldCompletionCallback* user_write_callback_; | 233 OldCompletionCallback* user_write_callback_; |
| 230 | 234 |
| 231 // Used by Read function. | 235 // Used by Read function. |
| 232 scoped_refptr<IOBuffer> user_read_buf_; | 236 scoped_refptr<IOBuffer> user_read_buf_; |
| 233 int user_read_buf_len_; | 237 int user_read_buf_len_; |
| 234 | 238 |
| 235 // Used by Write function. | 239 // Used by Write function. |
| 236 scoped_refptr<IOBuffer> user_write_buf_; | 240 scoped_refptr<IOBuffer> user_write_buf_; |
| 237 int user_write_buf_len_; | 241 int user_write_buf_len_; |
| 238 | 242 |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 308 // Added the following code Debugging in release mode. | 312 // Added the following code Debugging in release mode. |
| 309 mutable base::Lock lock_; | 313 mutable base::Lock lock_; |
| 310 // This is mutable so that CalledOnValidThread can set it. | 314 // This is mutable so that CalledOnValidThread can set it. |
| 311 // It's guarded by |lock_|. | 315 // It's guarded by |lock_|. |
| 312 mutable base::PlatformThreadId valid_thread_id_; | 316 mutable base::PlatformThreadId valid_thread_id_; |
| 313 }; | 317 }; |
| 314 | 318 |
| 315 } // namespace net | 319 } // namespace net |
| 316 | 320 |
| 317 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_NSS_H_ | 321 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_NSS_H_ |
| OLD | NEW |