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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 virtual void SetOmniboxSpeculation() OVERRIDE; | 64 virtual void SetOmniboxSpeculation() OVERRIDE; |
65 virtual bool WasEverUsed() const OVERRIDE; | 65 virtual bool WasEverUsed() const OVERRIDE; |
66 virtual bool UsingTCPFastOpen() const OVERRIDE; | 66 virtual bool UsingTCPFastOpen() const OVERRIDE; |
67 virtual int64 NumBytesRead() const OVERRIDE; | 67 virtual int64 NumBytesRead() const OVERRIDE; |
68 virtual base::TimeDelta GetConnectTimeMicros() const OVERRIDE; | 68 virtual base::TimeDelta GetConnectTimeMicros() const OVERRIDE; |
69 | 69 |
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, |
| 75 int buf_len, |
| 76 const CompletionCallback& callback) OVERRIDE; |
74 virtual int Write(IOBuffer* buf, | 77 virtual int Write(IOBuffer* buf, |
75 int buf_len, | 78 int buf_len, |
76 OldCompletionCallback* callback) OVERRIDE; | 79 OldCompletionCallback* callback) OVERRIDE; |
77 virtual bool SetReceiveBufferSize(int32 size) OVERRIDE; | 80 virtual bool SetReceiveBufferSize(int32 size) OVERRIDE; |
78 virtual bool SetSendBufferSize(int32 size) OVERRIDE; | 81 virtual bool SetSendBufferSize(int32 size) OVERRIDE; |
79 | 82 |
80 private: | 83 private: |
81 bool completed_handshake() const { | 84 bool completed_handshake() const { |
82 return next_handshake_state_ == STATE_COMPLETED_HANDSHAKE; | 85 return next_handshake_state_ == STATE_COMPLETED_HANDSHAKE; |
83 } | 86 } |
(...skipping 30 matching lines...) Expand all Loading... |
114 | 117 |
115 OldCompletionCallbackImpl<SSLClientSocketMac> transport_read_callback_; | 118 OldCompletionCallbackImpl<SSLClientSocketMac> transport_read_callback_; |
116 OldCompletionCallbackImpl<SSLClientSocketMac> transport_write_callback_; | 119 OldCompletionCallbackImpl<SSLClientSocketMac> transport_write_callback_; |
117 | 120 |
118 scoped_ptr<ClientSocketHandle> transport_; | 121 scoped_ptr<ClientSocketHandle> transport_; |
119 HostPortPair host_and_port_; | 122 HostPortPair host_and_port_; |
120 SSLConfig ssl_config_; | 123 SSLConfig ssl_config_; |
121 | 124 |
122 OldCompletionCallback* old_user_connect_callback_; | 125 OldCompletionCallback* old_user_connect_callback_; |
123 CompletionCallback user_connect_callback_; | 126 CompletionCallback user_connect_callback_; |
124 OldCompletionCallback* user_read_callback_; | 127 OldCompletionCallback* old_user_read_callback_; |
| 128 CompletionCallback user_read_callback_; |
125 OldCompletionCallback* user_write_callback_; | 129 OldCompletionCallback* user_write_callback_; |
126 | 130 |
127 // Used by Read function. | 131 // Used by Read function. |
128 scoped_refptr<IOBuffer> user_read_buf_; | 132 scoped_refptr<IOBuffer> user_read_buf_; |
129 int user_read_buf_len_; | 133 int user_read_buf_len_; |
130 | 134 |
131 // Used by Write function. | 135 // Used by Write function. |
132 scoped_refptr<IOBuffer> user_write_buf_; | 136 scoped_refptr<IOBuffer> user_write_buf_; |
133 int user_write_buf_len_; | 137 int user_write_buf_len_; |
134 | 138 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 // These are the IOBuffers used for operations on the underlying transport. | 180 // These are the IOBuffers used for operations on the underlying transport. |
177 scoped_refptr<IOBuffer> read_io_buf_; | 181 scoped_refptr<IOBuffer> read_io_buf_; |
178 scoped_refptr<IOBuffer> write_io_buf_; | 182 scoped_refptr<IOBuffer> write_io_buf_; |
179 | 183 |
180 BoundNetLog net_log_; | 184 BoundNetLog net_log_; |
181 }; | 185 }; |
182 | 186 |
183 } // namespace net | 187 } // namespace net |
184 | 188 |
185 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_MAC_H_ | 189 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_MAC_H_ |
OLD | NEW |