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

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

Issue 903273002: Update from https://crrev.com/315085 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « net/http/http_network_session.cc ('k') | net/http/http_network_transaction_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 553 matching lines...) Expand 10 before | Expand all | Expand 10 after
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()) &&
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
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
OLDNEW
« no previous file with comments | « net/http/http_network_session.cc ('k') | net/http/http_network_transaction_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698