OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/http/http_network_transaction.h" | 5 #include "net/http/http_network_transaction.h" |
6 | 6 |
7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
8 #include "base/field_trial.h" | 8 #include "base/field_trial.h" |
9 #include "base/format_macros.h" | 9 #include "base/format_macros.h" |
10 #include "base/histogram.h" | 10 #include "base/histogram.h" |
(...skipping 1497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1508 session_->spdy_session_pool(); | 1508 session_->spdy_session_pool(); |
1509 scoped_refptr<SpdySession> spdy_session; | 1509 scoped_refptr<SpdySession> spdy_session; |
1510 | 1510 |
1511 if (spdy_pool->HasSession(endpoint_)) { | 1511 if (spdy_pool->HasSession(endpoint_)) { |
1512 spdy_session = spdy_pool->Get(endpoint_, session_, net_log_); | 1512 spdy_session = spdy_pool->Get(endpoint_, session_, net_log_); |
1513 } else { | 1513 } else { |
1514 // SPDY is negotiated using the TLS next protocol negotiation (NPN) | 1514 // SPDY is negotiated using the TLS next protocol negotiation (NPN) |
1515 // extension, so |connection_| must contain an SSLClientSocket. | 1515 // extension, so |connection_| must contain an SSLClientSocket. |
1516 DCHECK(using_ssl_); | 1516 DCHECK(using_ssl_); |
1517 CHECK(connection_->socket()); | 1517 CHECK(connection_->socket()); |
1518 spdy_session = spdy_pool->GetSpdySessionFromSSLSocket( | 1518 int error = spdy_pool->GetSpdySessionFromSSLSocket( |
1519 endpoint_, session_, connection_.release(), net_log_); | 1519 endpoint_, session_, connection_.release(), net_log_, spdy_session); |
| 1520 if (error != OK) |
| 1521 return error; |
1520 } | 1522 } |
1521 | 1523 |
1522 CHECK(spdy_session.get()); | 1524 CHECK(spdy_session.get()); |
1523 | 1525 |
1524 UploadDataStream* upload_data = NULL; | 1526 UploadDataStream* upload_data = NULL; |
1525 if (request_->upload_data) { | 1527 if (request_->upload_data) { |
1526 int error_code = OK; | 1528 int error_code = OK; |
1527 upload_data = UploadDataStream::Create(request_->upload_data, &error_code); | 1529 upload_data = UploadDataStream::Create(request_->upload_data, &error_code); |
1528 if (!upload_data) | 1530 if (!upload_data) |
1529 return error_code; | 1531 return error_code; |
(...skipping 757 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2287 endpoint_); | 2289 endpoint_); |
2288 | 2290 |
2289 alternate_protocol_mode_ = kDoNotUseAlternateProtocol; | 2291 alternate_protocol_mode_ = kDoNotUseAlternateProtocol; |
2290 if (connection_->socket()) | 2292 if (connection_->socket()) |
2291 connection_->socket()->Disconnect(); | 2293 connection_->socket()->Disconnect(); |
2292 connection_->Reset(); | 2294 connection_->Reset(); |
2293 next_state_ = STATE_INIT_CONNECTION; | 2295 next_state_ = STATE_INIT_CONNECTION; |
2294 } | 2296 } |
2295 | 2297 |
2296 } // namespace net | 2298 } // namespace net |
OLD | NEW |