OLD | NEW |
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/cronet_url_request_context_adapter.h" | 5 #include "components/cronet/android/cronet_url_request_context_adapter.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/files/file_util.h" | 8 #include "base/files/file_util.h" |
9 #include "base/single_thread_task_runner.h" | 9 #include "base/single_thread_task_runner.h" |
10 #include "components/cronet/url_request_context_config.h" | 10 #include "components/cronet/url_request_context_config.h" |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 | 180 |
181 if (quic_hint.alternate_port <= std::numeric_limits<uint16>::min() || | 181 if (quic_hint.alternate_port <= std::numeric_limits<uint16>::min() || |
182 quic_hint.alternate_port > std::numeric_limits<uint16>::max()) { | 182 quic_hint.alternate_port > std::numeric_limits<uint16>::max()) { |
183 LOG(ERROR) << "Invalid QUIC hint alternate port: " | 183 LOG(ERROR) << "Invalid QUIC hint alternate port: " |
184 << quic_hint.alternate_port; | 184 << quic_hint.alternate_port; |
185 continue; | 185 continue; |
186 } | 186 } |
187 | 187 |
188 net::HostPortPair quic_hint_host_port_pair(canon_host, | 188 net::HostPortPair quic_hint_host_port_pair(canon_host, |
189 quic_hint.port); | 189 quic_hint.port); |
190 context_->http_server_properties()->SetAlternateProtocol( | 190 context_->http_server_properties()->AddAlternateProtocol( |
191 quic_hint_host_port_pair, | 191 quic_hint_host_port_pair, |
192 static_cast<uint16>(quic_hint.alternate_port), | 192 static_cast<uint16>(quic_hint.alternate_port), |
193 net::AlternateProtocol::QUIC, | 193 net::AlternateProtocol::QUIC, |
194 1.0f); | 194 1.0f); |
195 } | 195 } |
196 } | 196 } |
197 | 197 |
198 java_init_network_thread.Run(); | 198 java_init_network_thread.Run(); |
199 } | 199 } |
200 | 200 |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 | 256 |
257 void CronetURLRequestContextAdapter::StopNetLogOnNetworkThread() { | 257 void CronetURLRequestContextAdapter::StopNetLogOnNetworkThread() { |
258 DCHECK(GetNetworkTaskRunner()->BelongsToCurrentThread()); | 258 DCHECK(GetNetworkTaskRunner()->BelongsToCurrentThread()); |
259 if (net_log_logger_) { | 259 if (net_log_logger_) { |
260 net_log_logger_->StopObserving(); | 260 net_log_logger_->StopObserving(); |
261 net_log_logger_.reset(); | 261 net_log_logger_.reset(); |
262 } | 262 } |
263 } | 263 } |
264 | 264 |
265 } // namespace cronet | 265 } // namespace cronet |
OLD | NEW |