| 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_SPDY_SPDY_SESSION_H_ | 5 #ifndef NET_SPDY_SPDY_SESSION_H_ |
| 6 #define NET_SPDY_SPDY_SESSION_H_ | 6 #define NET_SPDY_SPDY_SESSION_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <list> | 10 #include <list> |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 | 149 |
| 150 // Fills SSL info in |ssl_info| and returns true when SSL is in use. | 150 // Fills SSL info in |ssl_info| and returns true when SSL is in use. |
| 151 bool GetSSLInfo(SSLInfo* ssl_info, | 151 bool GetSSLInfo(SSLInfo* ssl_info, |
| 152 bool* was_npn_negotiated, | 152 bool* was_npn_negotiated, |
| 153 SSLClientSocket::NextProto* protocol_negotiated); | 153 SSLClientSocket::NextProto* protocol_negotiated); |
| 154 | 154 |
| 155 // Fills SSL Certificate Request info |cert_request_info| and returns | 155 // Fills SSL Certificate Request info |cert_request_info| and returns |
| 156 // true when SSL is in use. | 156 // true when SSL is in use. |
| 157 bool GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info); | 157 bool GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info); |
| 158 | 158 |
| 159 // Returns the OriginBoundCertService used by this Socket, or NULL | 159 // Returns the ServerBoundCertService used by this Socket, or NULL |
| 160 // Origin Bound Certs are not supported in this session. | 160 // if server bound certs are not supported in this session. |
| 161 OriginBoundCertService* GetOriginBoundCertService() const; | 161 ServerBoundCertService* GetServerBoundCertService() const; |
| 162 | 162 |
| 163 // Returns the type of the origin bound cert that was sent, or | 163 // Returns the type of the domain bound cert that was sent, or |
| 164 // CLIENT_CERT_INVALID_TYPE if none was sent. | 164 // CLIENT_CERT_INVALID_TYPE if none was sent. |
| 165 SSLClientCertType GetOriginBoundCertType() const; | 165 SSLClientCertType GetDomainBoundCertType() const; |
| 166 | 166 |
| 167 // Reset all static settings to initialized values. Used to init test suite. | 167 // Reset all static settings to initialized values. Used to init test suite. |
| 168 static void ResetStaticSettingsToInit(); | 168 static void ResetStaticSettingsToInit(); |
| 169 | 169 |
| 170 // Specify the SPDY protocol to be used for SPDY session which do not use NPN | 170 // Specify the SPDY protocol to be used for SPDY session which do not use NPN |
| 171 // to negotiate a particular protocol. | 171 // to negotiate a particular protocol. |
| 172 static void set_default_protocol(SSLClientSocket::NextProto default_protocol); | 172 static void set_default_protocol(SSLClientSocket::NextProto default_protocol); |
| 173 | 173 |
| 174 // Sets the max concurrent streams per session, as a ceiling on any server | 174 // Sets the max concurrent streams per session, as a ceiling on any server |
| 175 // specific SETTINGS value. | 175 // specific SETTINGS value. |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 void set_initial_recv_window_size(int32 window_size) { | 242 void set_initial_recv_window_size(int32 window_size) { |
| 243 initial_recv_window_size_ = window_size; | 243 initial_recv_window_size_ = window_size; |
| 244 } | 244 } |
| 245 | 245 |
| 246 const BoundNetLog& net_log() const { return net_log_; } | 246 const BoundNetLog& net_log() const { return net_log_; } |
| 247 | 247 |
| 248 int GetPeerAddress(AddressList* address) const; | 248 int GetPeerAddress(AddressList* address) const; |
| 249 int GetLocalAddress(IPEndPoint* address) const; | 249 int GetLocalAddress(IPEndPoint* address) const; |
| 250 | 250 |
| 251 // Returns true if a request for a resource in |origin| requires a | 251 // Returns true if a request for a resource in |origin| requires a |
| 252 // SPDY CREDENTIAL frame to be sent first, with an origin bound certificate. | 252 // SPDY CREDENTIAL frame to be sent first, with a domain bound certificate. |
| 253 bool NeedsCredentials(const HostPortPair& origin) const; | 253 bool NeedsCredentials(const HostPortPair& origin) const; |
| 254 | 254 |
| 255 // Adds |alias| to set of aliases associated with this session. | 255 // Adds |alias| to set of aliases associated with this session. |
| 256 void AddPooledAlias(const HostPortProxyPair& alias); | 256 void AddPooledAlias(const HostPortProxyPair& alias); |
| 257 | 257 |
| 258 // Returns the set of aliases associated with this session. | 258 // Returns the set of aliases associated with this session. |
| 259 const std::set<HostPortProxyPair>& pooled_aliases() const { | 259 const std::set<HostPortProxyPair>& pooled_aliases() const { |
| 260 return pooled_aliases_; | 260 return pooled_aliases_; |
| 261 } | 261 } |
| 262 | 262 |
| (...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 683 | 683 |
| 684 const int status_; | 684 const int status_; |
| 685 const std::string description_; | 685 const std::string description_; |
| 686 | 686 |
| 687 DISALLOW_COPY_AND_ASSIGN(NetLogSpdySessionCloseParameter); | 687 DISALLOW_COPY_AND_ASSIGN(NetLogSpdySessionCloseParameter); |
| 688 }; | 688 }; |
| 689 | 689 |
| 690 } // namespace net | 690 } // namespace net |
| 691 | 691 |
| 692 #endif // NET_SPDY_SPDY_SESSION_H_ | 692 #endif // NET_SPDY_SPDY_SESSION_H_ |
| OLD | NEW |