| 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 // Enable or disable SSL. | 170 // Enable or disable SSL. |
| 171 static void SetSSLMode(bool enable) { use_ssl_ = enable; } | 171 static void SetSSLMode(bool enable) { use_ssl_ = enable; } |
| 172 static bool SSLMode() { return use_ssl_; } | 172 static bool SSLMode() { return use_ssl_; } |
| 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. |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 void set_initial_recv_window_size(int32 window_size) { | 262 void set_initial_recv_window_size(int32 window_size) { |
| 263 initial_recv_window_size_ = window_size; | 263 initial_recv_window_size_ = window_size; |
| 264 } | 264 } |
| 265 | 265 |
| 266 const BoundNetLog& net_log() const { return net_log_; } | 266 const BoundNetLog& net_log() const { return net_log_; } |
| 267 | 267 |
| 268 int GetPeerAddress(AddressList* address) const; | 268 int GetPeerAddress(AddressList* address) const; |
| 269 int GetLocalAddress(IPEndPoint* address) const; | 269 int GetLocalAddress(IPEndPoint* address) const; |
| 270 | 270 |
| 271 // Returns true if a request for a resource in |origin| requires a | 271 // Returns true if a request for a resource in |origin| requires a |
| 272 // SPDY CREDENTIAL frame to be sent first, with an origin bound certificate. | 272 // SPDY CREDENTIAL frame to be sent first, with a domain bound certificate. |
| 273 bool NeedsCredentials(const HostPortPair& origin) const; | 273 bool NeedsCredentials(const HostPortPair& origin) const; |
| 274 | 274 |
| 275 // Adds |alias| to set of aliases associated with this session. | 275 // Adds |alias| to set of aliases associated with this session. |
| 276 void AddPooledAlias(const HostPortProxyPair& alias); | 276 void AddPooledAlias(const HostPortProxyPair& alias); |
| 277 | 277 |
| 278 // Returns the set of aliases associated with this session. | 278 // Returns the set of aliases associated with this session. |
| 279 const std::set<HostPortProxyPair>& pooled_aliases() const { | 279 const std::set<HostPortProxyPair>& pooled_aliases() const { |
| 280 return pooled_aliases_; | 280 return pooled_aliases_; |
| 281 } | 281 } |
| 282 | 282 |
| (...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 718 | 718 |
| 719 const int status_; | 719 const int status_; |
| 720 const std::string description_; | 720 const std::string description_; |
| 721 | 721 |
| 722 DISALLOW_COPY_AND_ASSIGN(NetLogSpdySessionCloseParameter); | 722 DISALLOW_COPY_AND_ASSIGN(NetLogSpdySessionCloseParameter); |
| 723 }; | 723 }; |
| 724 | 724 |
| 725 } // namespace net | 725 } // namespace net |
| 726 | 726 |
| 727 #endif // NET_SPDY_SPDY_SESSION_H_ | 727 #endif // NET_SPDY_SPDY_SESSION_H_ |
| OLD | NEW |