OLD | NEW |
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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 kNextProtoUnsupported = 0, // The server doesn't support NPN. | 74 kNextProtoUnsupported = 0, // The server doesn't support NPN. |
75 kNextProtoNegotiated = 1, // We agreed on a protocol. | 75 kNextProtoNegotiated = 1, // We agreed on a protocol. |
76 kNextProtoNoOverlap = 2, // No protocols in common. We requested | 76 kNextProtoNoOverlap = 2, // No protocols in common. We requested |
77 // the first protocol in our list. | 77 // the first protocol in our list. |
78 }; | 78 }; |
79 | 79 |
80 // StreamSocket: | 80 // StreamSocket: |
81 virtual bool WasNpnNegotiated() const OVERRIDE; | 81 virtual bool WasNpnNegotiated() const OVERRIDE; |
82 virtual NextProto GetNegotiatedProtocol() const OVERRIDE; | 82 virtual NextProto GetNegotiatedProtocol() const OVERRIDE; |
83 | 83 |
84 // Format a unique key for the SSL session cache. This method | 84 virtual std::string GetSessionCacheKey() const = 0; |
85 // is necessary so that all classes create cache keys in a consistent | |
86 // manner. | |
87 static std::string FormatSessionCacheKey(std::string host_and_port, | |
88 std::string ssl_session_cache_shard); | |
89 | 85 |
90 // Returns true if there is a cache entry in the ssl session cache | 86 // Returns true if there is a cache entry in the ssl session cache |
91 // for the given cache key. | 87 // for the given cache key. |
92 // | 88 // |
93 // The cache key consists of a host and port concatenated with a session | 89 // The cache key consists of a host and port concatenated with a session |
94 // cache shard. | 90 // cache shard. |
95 virtual bool InSessionCache() const = 0; | 91 virtual bool InSessionCache() const = 0; |
96 | 92 |
97 // Tells the session cache to monitor this socket's session and inform | 93 // Tells the session cache to monitor this socket's session and inform |
98 // its SSLConnectJobMessenger upon the session's connection's completion. | 94 // its SSLConnectJobMessenger upon the session's connection's completion. |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 bool signed_cert_timestamps_received_; | 212 bool signed_cert_timestamps_received_; |
217 // True if a stapled OCSP response was received. | 213 // True if a stapled OCSP response was received. |
218 bool stapled_ocsp_response_received_; | 214 bool stapled_ocsp_response_received_; |
219 | 215 |
220 static bool enable_connect_job_waiting_; | 216 static bool enable_connect_job_waiting_; |
221 }; | 217 }; |
222 | 218 |
223 } // namespace net | 219 } // namespace net |
224 | 220 |
225 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_H_ | 221 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_H_ |
OLD | NEW |