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