| 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_WIN_H_ | 5 #ifndef NET_SOCKET_SSL_CLIENT_SOCKET_WIN_H_ |
| 6 #define NET_SOCKET_SSL_CLIENT_SOCKET_WIN_H_ | 6 #define NET_SOCKET_SSL_CLIENT_SOCKET_WIN_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #define SECURITY_WIN32 // Needs to be defined before including security.h | 9 #define SECURITY_WIN32 // Needs to be defined before including security.h |
| 10 | 10 |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 virtual const BoundNetLog& NetLog() const { return net_log_; } | 66 virtual const BoundNetLog& NetLog() const { return net_log_; } |
| 67 virtual void SetSubresourceSpeculation(); | 67 virtual void SetSubresourceSpeculation(); |
| 68 virtual void SetOmniboxSpeculation(); | 68 virtual void SetOmniboxSpeculation(); |
| 69 virtual bool WasEverUsed() const; | 69 virtual bool WasEverUsed() const; |
| 70 virtual bool UsingTCPFastOpen() const; | 70 virtual bool UsingTCPFastOpen() const; |
| 71 virtual int64 NumBytesRead() const; | 71 virtual int64 NumBytesRead() const; |
| 72 virtual base::TimeDelta GetConnectTimeMicros() const; | 72 virtual base::TimeDelta GetConnectTimeMicros() const; |
| 73 | 73 |
| 74 // Socket implementation. | 74 // Socket implementation. |
| 75 virtual int Read(IOBuffer* buf, int buf_len, OldCompletionCallback* callback); | 75 virtual int Read(IOBuffer* buf, int buf_len, OldCompletionCallback* callback); |
| 76 virtual int Read(IOBuffer* buf, int buf_len, |
| 77 const CompletionCallback& callback); |
| 76 virtual int Write(IOBuffer* buf, int buf_len, OldCompletionCallback* callback)
; | 78 virtual int Write(IOBuffer* buf, int buf_len, OldCompletionCallback* callback)
; |
| 77 | 79 |
| 78 virtual bool SetReceiveBufferSize(int32 size); | 80 virtual bool SetReceiveBufferSize(int32 size); |
| 79 virtual bool SetSendBufferSize(int32 size); | 81 virtual bool SetSendBufferSize(int32 size); |
| 80 | 82 |
| 81 private: | 83 private: |
| 82 bool completed_handshake() const { | 84 bool completed_handshake() const { |
| 83 return next_state_ == STATE_COMPLETED_HANDSHAKE; | 85 return next_state_ == STATE_COMPLETED_HANDSHAKE; |
| 84 } | 86 } |
| 85 | 87 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 | 121 |
| 120 scoped_ptr<ClientSocketHandle> transport_; | 122 scoped_ptr<ClientSocketHandle> transport_; |
| 121 HostPortPair host_and_port_; | 123 HostPortPair host_and_port_; |
| 122 SSLConfig ssl_config_; | 124 SSLConfig ssl_config_; |
| 123 | 125 |
| 124 // User function to callback when the Connect() completes. | 126 // User function to callback when the Connect() completes. |
| 125 OldCompletionCallback* old_user_connect_callback_; | 127 OldCompletionCallback* old_user_connect_callback_; |
| 126 CompletionCallback user_connect_callback_; | 128 CompletionCallback user_connect_callback_; |
| 127 | 129 |
| 128 // User function to callback when a Read() completes. | 130 // User function to callback when a Read() completes. |
| 129 OldCompletionCallback* user_read_callback_; | 131 OldCompletionCallback* old_user_read_callback_; |
| 132 CompletionCallback user_read_callback_; |
| 130 scoped_refptr<IOBuffer> user_read_buf_; | 133 scoped_refptr<IOBuffer> user_read_buf_; |
| 131 int user_read_buf_len_; | 134 int user_read_buf_len_; |
| 132 | 135 |
| 133 // User function to callback when a Write() completes. | 136 // User function to callback when a Write() completes. |
| 134 OldCompletionCallback* user_write_callback_; | 137 OldCompletionCallback* user_write_callback_; |
| 135 scoped_refptr<IOBuffer> user_write_buf_; | 138 scoped_refptr<IOBuffer> user_write_buf_; |
| 136 int user_write_buf_len_; | 139 int user_write_buf_len_; |
| 137 | 140 |
| 138 // Used to Read and Write using transport_. | 141 // Used to Read and Write using transport_. |
| 139 scoped_refptr<IOBuffer> transport_read_buf_; | 142 scoped_refptr<IOBuffer> transport_read_buf_; |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 | 208 |
| 206 // True when the decrypter needs more data in order to decrypt. | 209 // True when the decrypter needs more data in order to decrypt. |
| 207 bool need_more_data_; | 210 bool need_more_data_; |
| 208 | 211 |
| 209 BoundNetLog net_log_; | 212 BoundNetLog net_log_; |
| 210 }; | 213 }; |
| 211 | 214 |
| 212 } // namespace net | 215 } // namespace net |
| 213 | 216 |
| 214 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_WIN_H_ | 217 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_WIN_H_ |
| OLD | NEW |