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 1824903002: Change the AlternativeServiceMap with SchemeOriginPair key. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 1183 matching lines...) Expand 10 before | Expand all | Expand 10 after
1194 // a 1xx that isn't a 100 is rare). 1194 // a 1xx that isn't a 100 is rare).
1195 // Unless this is a WebSocket request, in which case we pass it on up. 1195 // Unless this is a WebSocket request, in which case we pass it on up.
1196 if (response_.headers->response_code() / 100 == 1 && 1196 if (response_.headers->response_code() / 100 == 1 &&
1197 !ForWebSocketHandshake()) { 1197 !ForWebSocketHandshake()) {
1198 response_.headers = new HttpResponseHeaders(std::string()); 1198 response_.headers = new HttpResponseHeaders(std::string());
1199 next_state_ = STATE_READ_HEADERS; 1199 next_state_ = STATE_READ_HEADERS;
1200 return OK; 1200 return OK;
1201 } 1201 }
1202 1202
1203 session_->http_stream_factory()->ProcessAlternativeServices( 1203 session_->http_stream_factory()->ProcessAlternativeServices(
1204 session_, response_.headers.get(), HostPortPair::FromURL(request_->url)); 1204 session_, response_.headers.get(), url::SchemeHostPort(request_->url));
1205 1205
1206 if (IsSecureRequest()) 1206 if (IsSecureRequest())
1207 stream_->GetSSLInfo(&response_.ssl_info); 1207 stream_->GetSSLInfo(&response_.ssl_info);
1208 1208
1209 int rv = HandleAuthChallenge(); 1209 int rv = HandleAuthChallenge();
1210 if (rv != OK) 1210 if (rv != OK)
1211 return rv; 1211 return rv;
1212 1212
1213 headers_valid_ = true; 1213 headers_valid_ = true;
1214 return OK; 1214 return OK;
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after
1756 DCHECK(stream_request_); 1756 DCHECK(stream_request_);
1757 1757
1758 // Since the transaction can restart with auth credentials, it may create a 1758 // Since the transaction can restart with auth credentials, it may create a
1759 // stream more than once. Accumulate all of the connection attempts across 1759 // stream more than once. Accumulate all of the connection attempts across
1760 // those streams by appending them to the vector: 1760 // those streams by appending them to the vector:
1761 for (const auto& attempt : stream_request_->connection_attempts()) 1761 for (const auto& attempt : stream_request_->connection_attempts())
1762 connection_attempts_.push_back(attempt); 1762 connection_attempts_.push_back(attempt);
1763 } 1763 }
1764 1764
1765 } // namespace net 1765 } // namespace net
OLDNEW
« no previous file with comments | « net/http/bidirectional_stream_unittest.cc ('k') | net/http/http_network_transaction_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698