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

Side by Side Diff: components/cronet/android/url_request_context_adapter.cc

Issue 665083009: ABANDONED Handle multiple AlternateProtocols for each HostPortPair. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Another Cronet occurrence. Created 5 years, 11 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/cronet/android/url_request_context_adapter.h" 5 #include "components/cronet/android/url_request_context_adapter.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 196
197 if (quic_hint.alternate_port <= std::numeric_limits<uint16>::min() || 197 if (quic_hint.alternate_port <= std::numeric_limits<uint16>::min() ||
198 quic_hint.alternate_port > std::numeric_limits<uint16>::max()) { 198 quic_hint.alternate_port > std::numeric_limits<uint16>::max()) {
199 LOG(ERROR) << "Invalid QUIC hint alternate port: " 199 LOG(ERROR) << "Invalid QUIC hint alternate port: "
200 << quic_hint.alternate_port; 200 << quic_hint.alternate_port;
201 continue; 201 continue;
202 } 202 }
203 203
204 net::HostPortPair quic_hint_host_port_pair(canon_host, 204 net::HostPortPair quic_hint_host_port_pair(canon_host,
205 quic_hint.port); 205 quic_hint.port);
206 context_->http_server_properties()->SetAlternateProtocol( 206 context_->http_server_properties()->AddAlternateProtocol(
207 quic_hint_host_port_pair, 207 quic_hint_host_port_pair,
208 static_cast<uint16>(quic_hint.alternate_port), 208 static_cast<uint16>(quic_hint.alternate_port),
209 net::AlternateProtocol::QUIC, 209 net::AlternateProtocol::QUIC,
210 1.0f); 210 1.0f);
211 } 211 }
212 } 212 }
213 load_disable_cache_ = config_->load_disable_cache; 213 load_disable_cache_ = config_->load_disable_cache;
214 config_.reset(NULL); 214 config_.reset(NULL);
215 215
216 if (VLOG_IS_ON(2)) { 216 if (VLOG_IS_ON(2)) {
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 net_log_logger_.reset(); 313 net_log_logger_.reset();
314 } 314 }
315 } 315 }
316 316
317 void NetLogObserver::OnAddEntry(const net::NetLog::Entry& entry) { 317 void NetLogObserver::OnAddEntry(const net::NetLog::Entry& entry) {
318 VLOG(2) << "Net log entry: type=" << entry.type() 318 VLOG(2) << "Net log entry: type=" << entry.type()
319 << ", source=" << entry.source().type << ", phase=" << entry.phase(); 319 << ", source=" << entry.source().type << ", phase=" << entry.phase();
320 } 320 }
321 321
322 } // namespace cronet 322 } // namespace cronet
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698