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

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

Issue 1216703002: Implement multiple alternative services per origin. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 LOG(ERROR) << "Invalid QUIC hint alternate port: " 185 LOG(ERROR) << "Invalid QUIC hint alternate port: "
186 << quic_hint.alternate_port; 186 << quic_hint.alternate_port;
187 continue; 187 continue;
188 } 188 }
189 189
190 net::HostPortPair quic_hint_host_port_pair(canon_host, 190 net::HostPortPair quic_hint_host_port_pair(canon_host,
191 quic_hint.port); 191 quic_hint.port);
192 net::AlternativeService alternative_service( 192 net::AlternativeService alternative_service(
193 net::AlternateProtocol::QUIC, "", 193 net::AlternateProtocol::QUIC, "",
194 static_cast<uint16>(quic_hint.alternate_port)); 194 static_cast<uint16>(quic_hint.alternate_port));
195 context_->http_server_properties()->SetAlternativeService( 195 context_->http_server_properties()->AddAlternativeService(
196 quic_hint_host_port_pair, alternative_service, 1.0f); 196 quic_hint_host_port_pair, alternative_service, 1.0f);
197 } 197 }
198 } 198 }
199 load_disable_cache_ = config_->load_disable_cache; 199 load_disable_cache_ = config_->load_disable_cache;
200 config_.reset(NULL); 200 config_.reset(NULL);
201 201
202 if (VLOG_IS_ON(2)) { 202 if (VLOG_IS_ON(2)) {
203 net_log_observer_.reset(new NetLogObserver()); 203 net_log_observer_.reset(new NetLogObserver());
204 context_->net_log()->DeprecatedAddObserver( 204 context_->net_log()->DeprecatedAddObserver(
205 net_log_observer_.get(), 205 net_log_observer_.get(),
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 write_to_file_observer_.reset(); 305 write_to_file_observer_.reset();
306 } 306 }
307 } 307 }
308 308
309 void NetLogObserver::OnAddEntry(const net::NetLog::Entry& entry) { 309 void NetLogObserver::OnAddEntry(const net::NetLog::Entry& entry) {
310 VLOG(2) << "Net log entry: type=" << entry.type() 310 VLOG(2) << "Net log entry: type=" << entry.type()
311 << ", source=" << entry.source().type << ", phase=" << entry.phase(); 311 << ", source=" << entry.source().type << ", phase=" << entry.phase();
312 } 312 }
313 313
314 } // namespace cronet 314 } // namespace cronet
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698