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