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

Unified 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: Last minute compile fixes 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 side-by-side diff with in-line comments
Download patch
Index: net/socket/ssl_client_socket_openssl.h
diff --git a/net/socket/ssl_client_socket_openssl.h b/net/socket/ssl_client_socket_openssl.h
index 12d92296e2f826186b38fc13de05b608a21c16cc..18496072088cc3902a4f7db78a4a18fe39c3e66e 100644
--- a/net/socket/ssl_client_socket_openssl.h
+++ b/net/socket/ssl_client_socket_openssl.h
@@ -123,9 +123,10 @@ class SSLClientSocketOpenSSL : public SSLClientSocket {
void TransportReadComplete(int result);
bool transport_send_busy_;
- scoped_refptr<DrainableIOBuffer> send_buffer_;
bool transport_recv_busy_;
bool transport_recv_eof_;
+
+ scoped_refptr<DrainableIOBuffer> send_buffer_;
scoped_refptr<IOBuffer> recv_buffer_;
CompletionCallback user_connect_callback_;
@@ -140,6 +141,14 @@ class SSLClientSocketOpenSSL : public SSLClientSocket {
scoped_refptr<IOBuffer> user_write_buf_;
int user_write_buf_len_;
+ // Used by DoPayloadRead() when attempting to fill the caller's buffer with
+ // as much data as possible without blocking.
+ // If DoPayloadRead() encounters an error after having read some data, stores
+ // the result to return on the *next* call to DoPayloadRead(). A value > 0
+ // indicates there is no pending result, otherwise 0 indicates EOF and < 0
+ // indicates an error.
+ int pending_read_error_;
+
// Set when handshake finishes.
scoped_refptr<X509Certificate> server_cert_;
CertVerifyResult server_cert_verify_result_;

Powered by Google App Engine
This is Rietveld 408576698