OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
114 virtual void GetSSLCertRequestInfo( | 114 virtual void GetSSLCertRequestInfo( |
115 SSLCertRequestInfo* cert_request_info) = 0; | 115 SSLCertRequestInfo* cert_request_info) = 0; |
116 | 116 |
117 // Get the application level protocol that we negotiated with the server. | 117 // Get the application level protocol that we negotiated with the server. |
118 // *proto is set to the resulting protocol (n.b. that the string may have | 118 // *proto is set to the resulting protocol (n.b. that the string may have |
119 // embedded NULs). | 119 // embedded NULs). |
120 // kNextProtoUnsupported: *proto is cleared. | 120 // kNextProtoUnsupported: *proto is cleared. |
121 // kNextProtoNegotiated: *proto is set to the negotiated protocol. | 121 // kNextProtoNegotiated: *proto is set to the negotiated protocol. |
122 // kNextProtoNoOverlap: *proto is set to the first protocol in the | 122 // kNextProtoNoOverlap: *proto is set to the first protocol in the |
123 // supported list. | 123 // supported list. |
124 virtual NextProtoStatus GetNextProto(std::string* proto) = 0; | 124 virtual NextProtoStatus GetNextProto(std::string* proto, |
125 std::string* server_proto) = 0; | |
agl
2011/12/05 16:38:10
s
ramant (doing other things)
2011/12/05 19:03:28
Done.
| |
125 | 126 |
126 static NextProto NextProtoFromString(const std::string& proto_string); | 127 static NextProto NextProtoFromString(const std::string& proto_string); |
127 | 128 |
129 static const char* NextProtoStatusToString( | |
130 const SSLClientSocket::NextProtoStatus status); | |
131 | |
132 static std::string ServerProtoToString(const std::string& server_proto); | |
agl
2011/12/05 16:38:10
Protos, server_protos
ramant (doing other things)
2011/12/05 19:03:28
Done.
| |
133 | |
128 static bool IgnoreCertError(int error, int load_flags); | 134 static bool IgnoreCertError(int error, int load_flags); |
129 | 135 |
130 virtual bool was_npn_negotiated() const; | 136 virtual bool was_npn_negotiated() const; |
131 | 137 |
132 virtual bool set_was_npn_negotiated(bool negotiated); | 138 virtual bool set_was_npn_negotiated(bool negotiated); |
133 | 139 |
134 virtual void UseDNSSEC(DNSSECProvider*) { } | 140 virtual void UseDNSSEC(DNSSECProvider*) { } |
135 | 141 |
136 virtual bool was_spdy_negotiated() const; | 142 virtual bool was_spdy_negotiated() const; |
137 | 143 |
138 virtual bool set_was_spdy_negotiated(bool negotiated); | 144 virtual bool set_was_spdy_negotiated(bool negotiated); |
139 | 145 |
140 private: | 146 private: |
141 // True if NPN was responded to, independent of selecting SPDY or HTTP. | 147 // True if NPN was responded to, independent of selecting SPDY or HTTP. |
142 bool was_npn_negotiated_; | 148 bool was_npn_negotiated_; |
143 // True if NPN successfully negotiated SPDY. | 149 // True if NPN successfully negotiated SPDY. |
144 bool was_spdy_negotiated_; | 150 bool was_spdy_negotiated_; |
145 }; | 151 }; |
146 | 152 |
147 } // namespace net | 153 } // namespace net |
148 | 154 |
149 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_H_ | 155 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_H_ |
OLD | NEW |