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

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

Issue 82823004: Use new GURL::SchemeIsWSOrWSS method in HttpNetworkTransaction (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 1 month 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 | « no previous file | no next file » | 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 1491 matching lines...) Expand 10 before | Expand all | Expand 10 after
1502 proxy_info_.proxy_server().host_port_pair().ToString()); 1502 proxy_info_.proxy_server().host_port_pair().ToString());
1503 } 1503 }
1504 case HttpAuth::AUTH_SERVER: 1504 case HttpAuth::AUTH_SERVER:
1505 return request_->url; 1505 return request_->url;
1506 default: 1506 default:
1507 return GURL(); 1507 return GURL();
1508 } 1508 }
1509 } 1509 }
1510 1510
1511 bool HttpNetworkTransaction::ForWebSocketHandshake() const { 1511 bool HttpNetworkTransaction::ForWebSocketHandshake() const {
1512 return (websocket_handshake_stream_base_create_helper_ && 1512 return websocket_handshake_stream_base_create_helper_ &&
1513 (request_->url.SchemeIs("ws") || request_->url.SchemeIs("wss"))); 1513 request_->url.SchemeIsWSOrWSS();
1514 } 1514 }
1515 1515
1516 #define STATE_CASE(s) \ 1516 #define STATE_CASE(s) \
1517 case s: \ 1517 case s: \
1518 description = base::StringPrintf("%s (0x%08X)", #s, s); \ 1518 description = base::StringPrintf("%s (0x%08X)", #s, s); \
1519 break 1519 break
1520 1520
1521 std::string HttpNetworkTransaction::DescribeState(State state) { 1521 std::string HttpNetworkTransaction::DescribeState(State state) {
1522 std::string description; 1522 std::string description;
1523 switch (state) { 1523 switch (state) {
(...skipping 16 matching lines...) Expand all
1540 description = base::StringPrintf("Unknown state 0x%08X (%u)", state, 1540 description = base::StringPrintf("Unknown state 0x%08X (%u)", state,
1541 state); 1541 state);
1542 break; 1542 break;
1543 } 1543 }
1544 return description; 1544 return description;
1545 } 1545 }
1546 1546
1547 #undef STATE_CASE 1547 #undef STATE_CASE
1548 1548
1549 } // namespace net 1549 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698