Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(182)

Side by Side Diff: net/socket/ssl_client_socket_openssl.h

Issue 12025040: When reading from an SSL socket, attempt to fully fill the caller's buffer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Initialization order Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 int DoPayloadWrite(); 116 int DoPayloadWrite();
117 117
118 int BufferSend(); 118 int BufferSend();
119 int BufferRecv(); 119 int BufferRecv();
120 void BufferSendComplete(int result); 120 void BufferSendComplete(int result);
121 void BufferRecvComplete(int result); 121 void BufferRecvComplete(int result);
122 void TransportWriteComplete(int result); 122 void TransportWriteComplete(int result);
123 void TransportReadComplete(int result); 123 void TransportReadComplete(int result);
124 124
125 bool transport_send_busy_; 125 bool transport_send_busy_;
126 scoped_refptr<DrainableIOBuffer> send_buffer_;
127 bool transport_recv_busy_; 126 bool transport_recv_busy_;
128 bool transport_recv_eof_; 127 bool transport_recv_eof_;
128
129 scoped_refptr<DrainableIOBuffer> send_buffer_;
129 scoped_refptr<IOBuffer> recv_buffer_; 130 scoped_refptr<IOBuffer> recv_buffer_;
130 131
131 CompletionCallback user_connect_callback_; 132 CompletionCallback user_connect_callback_;
132 CompletionCallback user_read_callback_; 133 CompletionCallback user_read_callback_;
133 CompletionCallback user_write_callback_; 134 CompletionCallback user_write_callback_;
134 135
135 // Used by Read function. 136 // Used by Read function.
136 scoped_refptr<IOBuffer> user_read_buf_; 137 scoped_refptr<IOBuffer> user_read_buf_;
137 int user_read_buf_len_; 138 int user_read_buf_len_;
138 139
139 // Used by Write function. 140 // Used by Write function.
140 scoped_refptr<IOBuffer> user_write_buf_; 141 scoped_refptr<IOBuffer> user_write_buf_;
141 int user_write_buf_len_; 142 int user_write_buf_len_;
142 143
144 // Used by DoPayloadRead() when attempting to completely fill the caller's
145 // buffer.
146 // If DoPayloadRead() encounters an error after having read some data, stores
147 // the result to return on the *next* call to DoPayloadRead(). A value > 0
148 // indicates there is no pending result (as 0 indicates EOF, < 0 indicates
149 // error).
150 int pending_read_error_;
151
143 // Set when handshake finishes. 152 // Set when handshake finishes.
144 scoped_refptr<X509Certificate> server_cert_; 153 scoped_refptr<X509Certificate> server_cert_;
145 CertVerifyResult server_cert_verify_result_; 154 CertVerifyResult server_cert_verify_result_;
146 bool completed_handshake_; 155 bool completed_handshake_;
147 156
148 // Stores client authentication information between ClientAuthHandler and 157 // Stores client authentication information between ClientAuthHandler and
149 // GetSSLCertRequestInfo calls. 158 // GetSSLCertRequestInfo calls.
150 bool client_auth_cert_needed_; 159 bool client_auth_cert_needed_;
151 // List of DER-encoded X.509 DistinguishedName of certificate authorities 160 // List of DER-encoded X.509 DistinguishedName of certificate authorities
152 // allowed by the server. 161 // allowed by the server.
(...skipping 26 matching lines...) Expand all
179 State next_handshake_state_; 188 State next_handshake_state_;
180 NextProtoStatus npn_status_; 189 NextProtoStatus npn_status_;
181 std::string npn_proto_; 190 std::string npn_proto_;
182 std::string server_protos_; 191 std::string server_protos_;
183 BoundNetLog net_log_; 192 BoundNetLog net_log_;
184 }; 193 };
185 194
186 } // namespace net 195 } // namespace net
187 196
188 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_OPENSSL_H_ 197 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_OPENSSL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698