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 <map> | 7 #include <map> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 1187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1198 | 1198 |
1199 dict->SetBoolean("sent_settings", sent_settings_); | 1199 dict->SetBoolean("sent_settings", sent_settings_); |
1200 dict->SetBoolean("received_settings", received_settings_); | 1200 dict->SetBoolean("received_settings", received_settings_); |
1201 return dict; | 1201 return dict; |
1202 } | 1202 } |
1203 | 1203 |
1204 bool SpdySession::IsReused() const { | 1204 bool SpdySession::IsReused() const { |
1205 return buffered_spdy_framer_->frames_received() > 0; | 1205 return buffered_spdy_framer_->frames_received() > 0; |
1206 } | 1206 } |
1207 | 1207 |
1208 int SpdySession::GetPeerAddress(AddressList* address) const { | 1208 int SpdySession::GetPeerAddress(IPEndPoint* address) const { |
1209 if (!connection_->socket()) | 1209 if (!connection_->socket()) |
1210 return ERR_SOCKET_NOT_CONNECTED; | 1210 return ERR_SOCKET_NOT_CONNECTED; |
1211 | 1211 |
1212 return connection_->socket()->GetPeerAddress(address); | 1212 return connection_->socket()->GetPeerAddress(address); |
1213 } | 1213 } |
1214 | 1214 |
1215 int SpdySession::GetLocalAddress(IPEndPoint* address) const { | 1215 int SpdySession::GetLocalAddress(IPEndPoint* address) const { |
1216 if (!connection_->socket()) | 1216 if (!connection_->socket()) |
1217 return ERR_SOCKET_NOT_CONNECTED; | 1217 return ERR_SOCKET_NOT_CONNECTED; |
1218 | 1218 |
(...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1946 SSLClientSocket* SpdySession::GetSSLClientSocket() const { | 1946 SSLClientSocket* SpdySession::GetSSLClientSocket() const { |
1947 if (!is_secure_) | 1947 if (!is_secure_) |
1948 return NULL; | 1948 return NULL; |
1949 SSLClientSocket* ssl_socket = | 1949 SSLClientSocket* ssl_socket = |
1950 reinterpret_cast<SSLClientSocket*>(connection_->socket()); | 1950 reinterpret_cast<SSLClientSocket*>(connection_->socket()); |
1951 DCHECK(ssl_socket); | 1951 DCHECK(ssl_socket); |
1952 return ssl_socket; | 1952 return ssl_socket; |
1953 } | 1953 } |
1954 | 1954 |
1955 } // namespace net | 1955 } // namespace net |
OLD | NEW |