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_OPENSSL_H_ | 5 #ifndef NET_SOCKET_SSL_CLIENT_SOCKET_OPENSSL_H_ |
6 #define NET_SOCKET_SSL_CLIENT_SOCKET_OPENSSL_H_ | 6 #define NET_SOCKET_SSL_CLIENT_SOCKET_OPENSSL_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 virtual const BoundNetLog& NetLog() const; | 72 virtual const BoundNetLog& NetLog() const; |
73 virtual void SetSubresourceSpeculation(); | 73 virtual void SetSubresourceSpeculation(); |
74 virtual void SetOmniboxSpeculation(); | 74 virtual void SetOmniboxSpeculation(); |
75 virtual bool WasEverUsed() const; | 75 virtual bool WasEverUsed() const; |
76 virtual bool UsingTCPFastOpen() const; | 76 virtual bool UsingTCPFastOpen() const; |
77 virtual int64 NumBytesRead() const; | 77 virtual int64 NumBytesRead() const; |
78 virtual base::TimeDelta GetConnectTimeMicros() const; | 78 virtual base::TimeDelta GetConnectTimeMicros() const; |
79 | 79 |
80 // Socket implementation. | 80 // Socket implementation. |
81 virtual int Read(IOBuffer* buf, int buf_len, OldCompletionCallback* callback); | 81 virtual int Read(IOBuffer* buf, int buf_len, OldCompletionCallback* callback); |
| 82 virtual int Read(IOBuffer* buf, int buf_len, |
| 83 const CompletionCallback& callback); |
82 virtual int Write(IOBuffer* buf, int buf_len, OldCompletionCallback* callback)
; | 84 virtual int Write(IOBuffer* buf, int buf_len, OldCompletionCallback* callback)
; |
83 virtual bool SetReceiveBufferSize(int32 size); | 85 virtual bool SetReceiveBufferSize(int32 size); |
84 virtual bool SetSendBufferSize(int32 size); | 86 virtual bool SetSendBufferSize(int32 size); |
85 | 87 |
86 private: | 88 private: |
87 bool Init(); | 89 bool Init(); |
88 void DoReadCallback(int result); | 90 void DoReadCallback(int result); |
89 void DoWriteCallback(int result); | 91 void DoWriteCallback(int result); |
90 | 92 |
91 bool DoTransportIO(); | 93 bool DoTransportIO(); |
(...skipping 22 matching lines...) Expand all Loading... |
114 | 116 |
115 OldCompletionCallbackImpl<SSLClientSocketOpenSSL> buffer_send_callback_; | 117 OldCompletionCallbackImpl<SSLClientSocketOpenSSL> buffer_send_callback_; |
116 OldCompletionCallbackImpl<SSLClientSocketOpenSSL> buffer_recv_callback_; | 118 OldCompletionCallbackImpl<SSLClientSocketOpenSSL> buffer_recv_callback_; |
117 bool transport_send_busy_; | 119 bool transport_send_busy_; |
118 scoped_refptr<DrainableIOBuffer> send_buffer_; | 120 scoped_refptr<DrainableIOBuffer> send_buffer_; |
119 bool transport_recv_busy_; | 121 bool transport_recv_busy_; |
120 scoped_refptr<IOBuffer> recv_buffer_; | 122 scoped_refptr<IOBuffer> recv_buffer_; |
121 | 123 |
122 OldCompletionCallback* old_user_connect_callback_; | 124 OldCompletionCallback* old_user_connect_callback_; |
123 CompletionCallback user_connect_callback_; | 125 CompletionCallback user_connect_callback_; |
124 OldCompletionCallback* user_read_callback_; | 126 OldCompletionCallback* old_user_read_callback_; |
| 127 CompletionCallback user_read_callback_; |
125 OldCompletionCallback* user_write_callback_; | 128 OldCompletionCallback* user_write_callback_; |
126 | 129 |
127 // Used by Read function. | 130 // Used by Read function. |
128 scoped_refptr<IOBuffer> user_read_buf_; | 131 scoped_refptr<IOBuffer> user_read_buf_; |
129 int user_read_buf_len_; | 132 int user_read_buf_len_; |
130 | 133 |
131 // Used by Write function. | 134 // Used by Write function. |
132 scoped_refptr<IOBuffer> user_write_buf_; | 135 scoped_refptr<IOBuffer> user_write_buf_; |
133 int user_write_buf_len_; | 136 int user_write_buf_len_; |
134 | 137 |
(...skipping 29 matching lines...) Expand all Loading... |
164 }; | 167 }; |
165 State next_handshake_state_; | 168 State next_handshake_state_; |
166 NextProtoStatus npn_status_; | 169 NextProtoStatus npn_status_; |
167 std::string npn_proto_; | 170 std::string npn_proto_; |
168 BoundNetLog net_log_; | 171 BoundNetLog net_log_; |
169 }; | 172 }; |
170 | 173 |
171 } // namespace net | 174 } // namespace net |
172 | 175 |
173 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_OPENSSL_H_ | 176 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_OPENSSL_H_ |
OLD | NEW |