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/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 553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 564 stream_.reset(stream); | 564 stream_.reset(stream); |
| 565 stream_request_.reset(); // we're done with the stream request | 565 stream_request_.reset(); // we're done with the stream request |
| 566 OnIOComplete(ERR_HTTPS_PROXY_TUNNEL_RESPONSE); | 566 OnIOComplete(ERR_HTTPS_PROXY_TUNNEL_RESPONSE); |
| 567 } | 567 } |
| 568 | 568 |
| 569 bool HttpNetworkTransaction::is_https_request() const { | 569 bool HttpNetworkTransaction::is_https_request() const { |
| 570 return request_->url.SchemeIs("https"); | 570 return request_->url.SchemeIs("https"); |
| 571 } | 571 } |
| 572 | 572 |
| 573 bool HttpNetworkTransaction::UsingHttpProxyWithoutTunnel() const { | 573 bool HttpNetworkTransaction::UsingHttpProxyWithoutTunnel() const { |
| 574 return (proxy_info_.is_http() || proxy_info_.is_https()) && | 574 return (proxy_info_.is_http() || proxy_info_.is_https() || |
| 575 proxy_info_.is_quic()) && | |
|
bengr
2015/02/03 23:03:08
@rch: would proxy_info_.is_quic() return false if
Ryan Hamilton
2015/02/03 23:06:50
ProxyInfo doesn't know about any tunnel which migh
| |
| 575 !(request_->url.SchemeIs("https") || request_->url.SchemeIsWSOrWSS()); | 576 !(request_->url.SchemeIs("https") || request_->url.SchemeIsWSOrWSS()); |
| 576 } | 577 } |
| 577 | 578 |
| 578 void HttpNetworkTransaction::DoCallback(int rv) { | 579 void HttpNetworkTransaction::DoCallback(int rv) { |
| 579 DCHECK_NE(rv, ERR_IO_PENDING); | 580 DCHECK_NE(rv, ERR_IO_PENDING); |
| 580 DCHECK(!callback_.is_null()); | 581 DCHECK(!callback_.is_null()); |
| 581 | 582 |
| 582 // Since Run may result in Read being called, clear user_callback_ up front. | 583 // Since Run may result in Read being called, clear user_callback_ up front. |
| 583 CompletionCallback c = callback_; | 584 CompletionCallback c = callback_; |
| 584 callback_.Reset(); | 585 callback_.Reset(); |
| (...skipping 945 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1530 description = base::StringPrintf("Unknown state 0x%08X (%u)", state, | 1531 description = base::StringPrintf("Unknown state 0x%08X (%u)", state, |
| 1531 state); | 1532 state); |
| 1532 break; | 1533 break; |
| 1533 } | 1534 } |
| 1534 return description; | 1535 return description; |
| 1535 } | 1536 } |
| 1536 | 1537 |
| 1537 #undef STATE_CASE | 1538 #undef STATE_CASE |
| 1538 | 1539 |
| 1539 } // namespace net | 1540 } // namespace net |
| OLD | NEW |