Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1192)

Side by Side Diff: net/http/http_network_transaction.cc

Issue 1326503003: Added a net::BidirectionalStream to expose a bidirectional streaming interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/http/http_network_transaction.h" 5 #include "net/http/http_network_transaction.h"
6 6
7 #include <set> 7 #include <set>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 response_.was_npn_negotiated = stream_request_->was_npn_negotiated(); 495 response_.was_npn_negotiated = stream_request_->was_npn_negotiated();
496 response_.npn_negotiated_protocol = SSLClientSocket::NextProtoToString( 496 response_.npn_negotiated_protocol = SSLClientSocket::NextProtoToString(
497 stream_request_->protocol_negotiated()); 497 stream_request_->protocol_negotiated());
498 response_.was_fetched_via_spdy = stream_request_->using_spdy(); 498 response_.was_fetched_via_spdy = stream_request_->using_spdy();
499 response_.was_fetched_via_proxy = !proxy_info_.is_direct(); 499 response_.was_fetched_via_proxy = !proxy_info_.is_direct();
500 if (response_.was_fetched_via_proxy && !proxy_info_.is_empty()) 500 if (response_.was_fetched_via_proxy && !proxy_info_.is_empty())
501 response_.proxy_server = proxy_info_.proxy_server().host_port_pair(); 501 response_.proxy_server = proxy_info_.proxy_server().host_port_pair();
502 OnIOComplete(OK); 502 OnIOComplete(OK);
503 } 503 }
504 504
505 void HttpNetworkTransaction::OnBidirectionalStreamReady(
506 const SSLConfig& used_ssl_config,
507 const ProxyInfo& used_proxy_info,
508 BidirectionalStream* stream) {
509 NOTREACHED();
510 }
511
505 void HttpNetworkTransaction::OnWebSocketHandshakeStreamReady( 512 void HttpNetworkTransaction::OnWebSocketHandshakeStreamReady(
506 const SSLConfig& used_ssl_config, 513 const SSLConfig& used_ssl_config,
507 const ProxyInfo& used_proxy_info, 514 const ProxyInfo& used_proxy_info,
508 WebSocketHandshakeStreamBase* stream) { 515 WebSocketHandshakeStreamBase* stream) {
509 OnStreamReady(used_ssl_config, used_proxy_info, stream); 516 OnStreamReady(used_ssl_config, used_proxy_info, stream);
510 } 517 }
511 518
512 void HttpNetworkTransaction::OnStreamFailed(int result, 519 void HttpNetworkTransaction::OnStreamFailed(int result,
513 const SSLConfig& used_ssl_config, 520 const SSLConfig& used_ssl_config,
514 SSLFailureState ssl_failure_state) { 521 SSLFailureState ssl_failure_state) {
(...skipping 1145 matching lines...) Expand 10 before | Expand all | Expand 10 after
1660 DCHECK(stream_request_); 1667 DCHECK(stream_request_);
1661 1668
1662 // Since the transaction can restart with auth credentials, it may create a 1669 // Since the transaction can restart with auth credentials, it may create a
1663 // stream more than once. Accumulate all of the connection attempts across 1670 // stream more than once. Accumulate all of the connection attempts across
1664 // those streams by appending them to the vector: 1671 // those streams by appending them to the vector:
1665 for (const auto& attempt : stream_request_->connection_attempts()) 1672 for (const auto& attempt : stream_request_->connection_attempts())
1666 connection_attempts_.push_back(attempt); 1673 connection_attempts_.push_back(attempt);
1667 } 1674 }
1668 1675
1669 } // namespace net 1676 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698