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

Unified Diff: net/socket/ssl_client_socket_openssl.h

Issue 353713005: Implements new, more robust design for communicating between SSLConnectJobs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changed location of enable_connect_job_waiting_ and added documentation. Created 6 years, 5 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 5d70c0523fabe0230b2361f7418688f1215fe0df..f18eec5874eb50422b0dd28eec163db85e99eb68 100644
--- a/net/socket/ssl_client_socket_openssl.h
+++ b/net/socket/ssl_client_socket_openssl.h
@@ -55,8 +55,15 @@ class SSLClientSocketOpenSSL : public SSLClientSocket {
const std::string& ssl_session_cache_shard() const {
return ssl_session_cache_shard_;
}
+ std::string GetSessionCacheKey() const;
wtc 2014/07/11 00:48:54 This method should be private because it is only c
mshelley 2014/07/11 23:26:27 Done.
// SSLClientSocket implementation.
+ virtual bool InSessionCache() const OVERRIDE;
+ virtual void WatchSessionForCompletion(
+ const base::Closure& callback) OVERRIDE;
+ virtual void SetSocketFailureCallback(const base::Closure& callback) OVERRIDE;
+ virtual void SetIsLeader() OVERRIDE;
+ virtual void OnSocketFailure() OVERRIDE;
virtual void GetSSLCertRequestInfo(
SSLCertRequestInfo* cert_request_info) OVERRIDE;
virtual NextProtoStatus GetNextProto(std::string* proto,
@@ -153,6 +160,12 @@ class SSLClientSocketOpenSSL : public SSLClientSocket {
bool transport_recv_busy_;
bool transport_recv_eof_;
+ // True if the socket has been read from before.
+ bool has_read_;
+
+ // Counts how many times the socket has been written to.
+ int has_written_;
wtc 2014/07/11 00:48:54 The has_read_ and has_written_ members should have
mshelley 2014/07/11 23:26:27 Done.
+
scoped_refptr<DrainableIOBuffer> send_buffer_;
scoped_refptr<IOBuffer> recv_buffer_;
@@ -208,6 +221,12 @@ class SSLClientSocketOpenSSL : public SSLClientSocket {
// The service for retrieving Channel ID keys. May be NULL.
ServerBoundCertService* server_bound_cert_service_;
+ // Callback that is invoked when the connection encounters an error.
+ base::Closure error_callback_;
+
+ // True if there may be pending sockets waiting for this socket to connect.
+ bool is_leader_;
wtc 2014/07/11 00:48:54 Delete this member. It is equivalent to !error_cal
mshelley 2014/07/11 23:26:27 Done.
+
// OpenSSL stuff
SSL* ssl_;
BIO* transport_bio_;

Powered by Google App Engine
This is Rietveld 408576698