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

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: Use std::move Created 5 years 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 504 matching lines...) Expand 10 before | Expand all | Expand 10 after
515 response_.was_npn_negotiated = stream_request_->was_npn_negotiated(); 515 response_.was_npn_negotiated = stream_request_->was_npn_negotiated();
516 response_.npn_negotiated_protocol = SSLClientSocket::NextProtoToString( 516 response_.npn_negotiated_protocol = SSLClientSocket::NextProtoToString(
517 stream_request_->protocol_negotiated()); 517 stream_request_->protocol_negotiated());
518 response_.was_fetched_via_spdy = stream_request_->using_spdy(); 518 response_.was_fetched_via_spdy = stream_request_->using_spdy();
519 response_.was_fetched_via_proxy = !proxy_info_.is_direct(); 519 response_.was_fetched_via_proxy = !proxy_info_.is_direct();
520 if (response_.was_fetched_via_proxy && !proxy_info_.is_empty()) 520 if (response_.was_fetched_via_proxy && !proxy_info_.is_empty())
521 response_.proxy_server = proxy_info_.proxy_server().host_port_pair(); 521 response_.proxy_server = proxy_info_.proxy_server().host_port_pair();
522 OnIOComplete(OK); 522 OnIOComplete(OK);
523 } 523 }
524 524
525 void HttpNetworkTransaction::OnBidirectionalStreamJobReady(
526 const SSLConfig& used_ssl_config,
527 const ProxyInfo& used_proxy_info,
528 BidirectionalStreamJob* stream) {
529 NOTREACHED();
530 }
531
525 void HttpNetworkTransaction::OnWebSocketHandshakeStreamReady( 532 void HttpNetworkTransaction::OnWebSocketHandshakeStreamReady(
526 const SSLConfig& used_ssl_config, 533 const SSLConfig& used_ssl_config,
527 const ProxyInfo& used_proxy_info, 534 const ProxyInfo& used_proxy_info,
528 WebSocketHandshakeStreamBase* stream) { 535 WebSocketHandshakeStreamBase* stream) {
529 OnStreamReady(used_ssl_config, used_proxy_info, stream); 536 OnStreamReady(used_ssl_config, used_proxy_info, stream);
530 } 537 }
531 538
532 void HttpNetworkTransaction::OnStreamFailed(int result, 539 void HttpNetworkTransaction::OnStreamFailed(int result,
533 const SSLConfig& used_ssl_config, 540 const SSLConfig& used_ssl_config,
534 SSLFailureState ssl_failure_state) { 541 SSLFailureState ssl_failure_state) {
(...skipping 1157 matching lines...) Expand 10 before | Expand all | Expand 10 after
1692 DCHECK(stream_request_); 1699 DCHECK(stream_request_);
1693 1700
1694 // Since the transaction can restart with auth credentials, it may create a 1701 // Since the transaction can restart with auth credentials, it may create a
1695 // stream more than once. Accumulate all of the connection attempts across 1702 // stream more than once. Accumulate all of the connection attempts across
1696 // those streams by appending them to the vector: 1703 // those streams by appending them to the vector:
1697 for (const auto& attempt : stream_request_->connection_attempts()) 1704 for (const auto& attempt : stream_request_->connection_attempts())
1698 connection_attempts_.push_back(attempt); 1705 connection_attempts_.push_back(attempt);
1699 } 1706 }
1700 1707
1701 } // namespace net 1708 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698