| 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 #include "net/spdy/spdy_session.h" | 5 #include "net/spdy/spdy_session.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 1964 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1975 } | 1975 } |
| 1976 | 1976 |
| 1977 bool SpdySession::GetSSLInfo(SSLInfo* ssl_info, | 1977 bool SpdySession::GetSSLInfo(SSLInfo* ssl_info, |
| 1978 bool* was_npn_negotiated, | 1978 bool* was_npn_negotiated, |
| 1979 NextProto* protocol_negotiated) { | 1979 NextProto* protocol_negotiated) { |
| 1980 *was_npn_negotiated = connection_->socket()->WasNpnNegotiated(); | 1980 *was_npn_negotiated = connection_->socket()->WasNpnNegotiated(); |
| 1981 *protocol_negotiated = connection_->socket()->GetNegotiatedProtocol(); | 1981 *protocol_negotiated = connection_->socket()->GetNegotiatedProtocol(); |
| 1982 return connection_->socket()->GetSSLInfo(ssl_info); | 1982 return connection_->socket()->GetSSLInfo(ssl_info); |
| 1983 } | 1983 } |
| 1984 | 1984 |
| 1985 bool SpdySession::GetSSLCertRequestInfo( | |
| 1986 SSLCertRequestInfo* cert_request_info) { | |
| 1987 if (!is_secure_) | |
| 1988 return false; | |
| 1989 GetSSLClientSocket()->GetSSLCertRequestInfo(cert_request_info); | |
| 1990 return true; | |
| 1991 } | |
| 1992 | |
| 1993 void SpdySession::OnError(SpdyFramer::SpdyError error_code) { | 1985 void SpdySession::OnError(SpdyFramer::SpdyError error_code) { |
| 1994 CHECK(in_io_loop_); | 1986 CHECK(in_io_loop_); |
| 1995 | 1987 |
| 1996 RecordProtocolErrorHistogram(MapFramerErrorToProtocolError(error_code)); | 1988 RecordProtocolErrorHistogram(MapFramerErrorToProtocolError(error_code)); |
| 1997 std::string description = | 1989 std::string description = |
| 1998 base::StringPrintf("Framer error: %d (%s).", | 1990 base::StringPrintf("Framer error: %d (%s).", |
| 1999 error_code, | 1991 error_code, |
| 2000 SpdyFramer::ErrorCodeToString(error_code)); | 1992 SpdyFramer::ErrorCodeToString(error_code)); |
| 2001 DoDrainSession(MapFramerErrorToNetError(error_code), description); | 1993 DoDrainSession(MapFramerErrorToNetError(error_code), description); |
| 2002 } | 1994 } |
| (...skipping 1262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3265 if (!queue->empty()) { | 3257 if (!queue->empty()) { |
| 3266 SpdyStreamId stream_id = queue->front(); | 3258 SpdyStreamId stream_id = queue->front(); |
| 3267 queue->pop_front(); | 3259 queue->pop_front(); |
| 3268 return stream_id; | 3260 return stream_id; |
| 3269 } | 3261 } |
| 3270 } | 3262 } |
| 3271 return 0; | 3263 return 0; |
| 3272 } | 3264 } |
| 3273 | 3265 |
| 3274 } // namespace net | 3266 } // namespace net |
| OLD | NEW |