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

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

Issue 384873002: This CL changes the lifespan of SSLConnectJobMessengers so that they are created only when needed, (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@useloop
Patch Set: Rebase, fixed issue where messenger field wasn't set to NULL after deletion Created 6 years, 4 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
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_H_ 5 #ifndef NET_SOCKET_SSL_CLIENT_SOCKET_H_
6 #define NET_SOCKET_SSL_CLIENT_SOCKET_H_ 6 #define NET_SOCKET_SSL_CLIENT_SOCKET_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/gtest_prod_util.h" 10 #include "base/gtest_prod_util.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 kNextProtoUnsupported = 0, // The server doesn't support NPN. 76 kNextProtoUnsupported = 0, // The server doesn't support NPN.
77 kNextProtoNegotiated = 1, // We agreed on a protocol. 77 kNextProtoNegotiated = 1, // We agreed on a protocol.
78 kNextProtoNoOverlap = 2, // No protocols in common. We requested 78 kNextProtoNoOverlap = 2, // No protocols in common. We requested
79 // the first protocol in our list. 79 // the first protocol in our list.
80 }; 80 };
81 81
82 // StreamSocket: 82 // StreamSocket:
83 virtual bool WasNpnNegotiated() const OVERRIDE; 83 virtual bool WasNpnNegotiated() const OVERRIDE;
84 virtual NextProto GetNegotiatedProtocol() const OVERRIDE; 84 virtual NextProto GetNegotiatedProtocol() const OVERRIDE;
85 85
86 // Formats a unique key for the SSL session cache. This method 86 virtual std::string GetSessionCacheKey() const = 0;
wtc 2014/08/12 14:51:00 Please document this method. Can you explain why
mshelley 2014/08/12 21:47:01 My comment below meant that I could delete the sta
87 // is necessary so that all classes create cache keys in a consistent
88 // manner.
89 // TODO(mshelley) This method will be deleted in an upcoming CL when
90 // it will no longer be necessary to generate a cache key outside of
91 // an SSLClientSocket.
92 static std::string CreateSessionCacheKey(
93 const HostPortPair& host_and_port,
94 const std::string& ssl_session_cache_shard);
95 87
96 // Returns true if there is a cache entry in the SSL session cache 88 // Returns true if there is a cache entry in the ssl session cache
97 // for the cache key of the SSL socket. 89 // for the given cache key.
wtc 2014/08/12 14:51:00 This seems to be a merge error. The original comme
mshelley 2014/08/12 21:47:00 Done.
98 // 90 //
99 // The cache key consists of a host and port concatenated with a session 91 // The cache key consists of a host and port concatenated with a session
100 // cache shard. These two strings are passed to the constructor of most 92 // cache shard. These two strings are passed to the constructor of most
101 // subclasses of SSLClientSocket. 93 // subclasses of SSLClientSocket.
102 virtual bool InSessionCache() const = 0; 94 virtual bool InSessionCache() const = 0;
103 95
104 // Sets |callback| to be run when the handshake has fully completed. 96 // Sets |callback| to be run when the handshake has fully completed.
105 // For example, in the case of False Start, Connect() will return 97 // For example, in the case of False Start, Connect() will return
106 // early, before the peer's TLS Finished message has been verified, 98 // early, before the peer's TLS Finished message has been verified,
107 // in order to allow the caller to call Write() and send application 99 // in order to allow the caller to call Write() and send application
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 bool channel_id_sent_; 216 bool channel_id_sent_;
225 // True if SCTs were received via a TLS extension. 217 // True if SCTs were received via a TLS extension.
226 bool signed_cert_timestamps_received_; 218 bool signed_cert_timestamps_received_;
227 // True if a stapled OCSP response was received. 219 // True if a stapled OCSP response was received.
228 bool stapled_ocsp_response_received_; 220 bool stapled_ocsp_response_received_;
229 }; 221 };
230 222
231 } // namespace net 223 } // namespace net
232 224
233 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_H_ 225 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698