Chromium Code Reviews| 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/bind.h" | 10 #include "base/bind.h" |
| (...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 428 if (state_ != CONNECTED) | 428 if (state_ != CONNECTED) |
| 429 return false; | 429 return false; |
| 430 | 430 |
| 431 SSLInfo ssl_info; | 431 SSLInfo ssl_info; |
| 432 bool was_npn_negotiated; | 432 bool was_npn_negotiated; |
| 433 NextProto protocol_negotiated = kProtoUnknown; | 433 NextProto protocol_negotiated = kProtoUnknown; |
| 434 if (!GetSSLInfo(&ssl_info, &was_npn_negotiated, &protocol_negotiated)) | 434 if (!GetSSLInfo(&ssl_info, &was_npn_negotiated, &protocol_negotiated)) |
| 435 return true; // This is not a secure session, so all domains are okay. | 435 return true; // This is not a secure session, so all domains are okay. |
| 436 | 436 |
| 437 return !ssl_info.client_cert_sent && | 437 return !ssl_info.client_cert_sent && |
| 438 (g_enable_credential_frames || !ssl_info.channel_id_sent) && | 438 (g_enable_credential_frames || !ssl_info.channel_id_sent || |
| 439 ServerBoundCertService::GetDomainForHost(domain) == | |
| 440 ServerBoundCertService::GetDomainForHost( | |
| 441 host_port_proxy_pair_.first.host())) && | |
|
wtc
2012/09/19 22:42:35
It would be useful to add a comment to explain thi
| |
| 439 ssl_info.cert->VerifyNameMatch(domain); | 442 ssl_info.cert->VerifyNameMatch(domain); |
| 440 } | 443 } |
| 441 | 444 |
| 442 void SpdySession::SetStreamHasWriteAvailable(SpdyStream* stream, | 445 void SpdySession::SetStreamHasWriteAvailable(SpdyStream* stream, |
| 443 SpdyIOBufferProducer* producer) { | 446 SpdyIOBufferProducer* producer) { |
| 444 write_queue_.push(producer); | 447 write_queue_.push(producer); |
| 445 stream_producers_[producer] = stream; | 448 stream_producers_[producer] = stream; |
| 446 WriteSocketLater(); | 449 WriteSocketLater(); |
| 447 } | 450 } |
| 448 | 451 |
| (...skipping 1550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1999 SSLClientSocket* SpdySession::GetSSLClientSocket() const { | 2002 SSLClientSocket* SpdySession::GetSSLClientSocket() const { |
| 2000 if (!is_secure_) | 2003 if (!is_secure_) |
| 2001 return NULL; | 2004 return NULL; |
| 2002 SSLClientSocket* ssl_socket = | 2005 SSLClientSocket* ssl_socket = |
| 2003 reinterpret_cast<SSLClientSocket*>(connection_->socket()); | 2006 reinterpret_cast<SSLClientSocket*>(connection_->socket()); |
| 2004 DCHECK(ssl_socket); | 2007 DCHECK(ssl_socket); |
| 2005 return ssl_socket; | 2008 return ssl_socket; |
| 2006 } | 2009 } |
| 2007 | 2010 |
| 2008 } // namespace net | 2011 } // namespace net |
| OLD | NEW |