| 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_MAC_H_ | 5 #ifndef NET_SOCKET_SSL_CLIENT_SOCKET_MAC_H_ |
| 6 #define NET_SOCKET_SSL_CLIENT_SOCKET_MAC_H_ | 6 #define NET_SOCKET_SSL_CLIENT_SOCKET_MAC_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <Security/Security.h> | 9 #include <Security/Security.h> |
| 10 | 10 |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 // Socket implementation. | 70 // Socket implementation. |
| 71 virtual int Read(IOBuffer* buf, | 71 virtual int Read(IOBuffer* buf, |
| 72 int buf_len, | 72 int buf_len, |
| 73 OldCompletionCallback* callback) OVERRIDE; | 73 OldCompletionCallback* callback) OVERRIDE; |
| 74 virtual int Read(IOBuffer* buf, | 74 virtual int Read(IOBuffer* buf, |
| 75 int buf_len, | 75 int buf_len, |
| 76 const CompletionCallback& callback) OVERRIDE; | 76 const CompletionCallback& callback) OVERRIDE; |
| 77 virtual int Write(IOBuffer* buf, | 77 virtual int Write(IOBuffer* buf, |
| 78 int buf_len, | 78 int buf_len, |
| 79 OldCompletionCallback* callback) OVERRIDE; | 79 OldCompletionCallback* callback) OVERRIDE; |
| 80 virtual int Write(IOBuffer* buf, | |
| 81 int buf_len, | |
| 82 const CompletionCallback& callback) OVERRIDE; | |
| 83 virtual bool SetReceiveBufferSize(int32 size) OVERRIDE; | 80 virtual bool SetReceiveBufferSize(int32 size) OVERRIDE; |
| 84 virtual bool SetSendBufferSize(int32 size) OVERRIDE; | 81 virtual bool SetSendBufferSize(int32 size) OVERRIDE; |
| 85 | 82 |
| 86 private: | 83 private: |
| 87 bool completed_handshake() const { | 84 bool completed_handshake() const { |
| 88 return next_handshake_state_ == STATE_COMPLETED_HANDSHAKE; | 85 return next_handshake_state_ == STATE_COMPLETED_HANDSHAKE; |
| 89 } | 86 } |
| 90 // Initializes the SSLContext. Returns a net error code. | 87 // Initializes the SSLContext. Returns a net error code. |
| 91 int InitializeSSLContext(); | 88 int InitializeSSLContext(); |
| 92 | 89 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 122 OldCompletionCallbackImpl<SSLClientSocketMac> transport_write_callback_; | 119 OldCompletionCallbackImpl<SSLClientSocketMac> transport_write_callback_; |
| 123 | 120 |
| 124 scoped_ptr<ClientSocketHandle> transport_; | 121 scoped_ptr<ClientSocketHandle> transport_; |
| 125 HostPortPair host_and_port_; | 122 HostPortPair host_and_port_; |
| 126 SSLConfig ssl_config_; | 123 SSLConfig ssl_config_; |
| 127 | 124 |
| 128 OldCompletionCallback* old_user_connect_callback_; | 125 OldCompletionCallback* old_user_connect_callback_; |
| 129 CompletionCallback user_connect_callback_; | 126 CompletionCallback user_connect_callback_; |
| 130 OldCompletionCallback* old_user_read_callback_; | 127 OldCompletionCallback* old_user_read_callback_; |
| 131 CompletionCallback user_read_callback_; | 128 CompletionCallback user_read_callback_; |
| 132 OldCompletionCallback* old_user_write_callback_; | 129 OldCompletionCallback* user_write_callback_; |
| 133 CompletionCallback user_write_callback_; | |
| 134 | 130 |
| 135 // Used by Read function. | 131 // Used by Read function. |
| 136 scoped_refptr<IOBuffer> user_read_buf_; | 132 scoped_refptr<IOBuffer> user_read_buf_; |
| 137 int user_read_buf_len_; | 133 int user_read_buf_len_; |
| 138 | 134 |
| 139 // Used by Write function. | 135 // Used by Write function. |
| 140 scoped_refptr<IOBuffer> user_write_buf_; | 136 scoped_refptr<IOBuffer> user_write_buf_; |
| 141 int user_write_buf_len_; | 137 int user_write_buf_len_; |
| 142 | 138 |
| 143 enum State { | 139 enum State { |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 // These are the IOBuffers used for operations on the underlying transport. | 180 // These are the IOBuffers used for operations on the underlying transport. |
| 185 scoped_refptr<IOBuffer> read_io_buf_; | 181 scoped_refptr<IOBuffer> read_io_buf_; |
| 186 scoped_refptr<IOBuffer> write_io_buf_; | 182 scoped_refptr<IOBuffer> write_io_buf_; |
| 187 | 183 |
| 188 BoundNetLog net_log_; | 184 BoundNetLog net_log_; |
| 189 }; | 185 }; |
| 190 | 186 |
| 191 } // namespace net | 187 } // namespace net |
| 192 | 188 |
| 193 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_MAC_H_ | 189 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_MAC_H_ |
| OLD | NEW |