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

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

Issue 1091283007: Rename methods and members and const variables to alternative service. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 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/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/android/jni_string.h" 8 #include "base/android/jni_string.h"
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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 context_.reset(context_builder.Build()); 157 context_.reset(context_builder.Build());
158 158
159 default_load_flags_ = net::LOAD_DO_NOT_SAVE_COOKIES | 159 default_load_flags_ = net::LOAD_DO_NOT_SAVE_COOKIES |
160 net::LOAD_DO_NOT_SEND_COOKIES; 160 net::LOAD_DO_NOT_SEND_COOKIES;
161 if (config->load_disable_cache) 161 if (config->load_disable_cache)
162 default_load_flags_ |= net::LOAD_DISABLE_CACHE; 162 default_load_flags_ |= net::LOAD_DISABLE_CACHE;
163 163
164 // Currently (circa M39) enabling QUIC requires setting probability threshold. 164 // Currently (circa M39) enabling QUIC requires setting probability threshold.
165 if (config->enable_quic) { 165 if (config->enable_quic) {
166 context_->http_server_properties() 166 context_->http_server_properties()
167 ->SetAlternateProtocolProbabilityThreshold(0.0f); 167 ->SetAlternativeServiceProbabilityThreshold(0.0f);
168 for (auto hint = config->quic_hints.begin(); 168 for (auto hint = config->quic_hints.begin();
169 hint != config->quic_hints.end(); ++hint) { 169 hint != config->quic_hints.end(); ++hint) {
170 const URLRequestContextConfig::QuicHint& quic_hint = **hint; 170 const URLRequestContextConfig::QuicHint& quic_hint = **hint;
171 if (quic_hint.host.empty()) { 171 if (quic_hint.host.empty()) {
172 LOG(ERROR) << "Empty QUIC hint host: " << quic_hint.host; 172 LOG(ERROR) << "Empty QUIC hint host: " << quic_hint.host;
173 continue; 173 continue;
174 } 174 }
175 175
176 url::CanonHostInfo host_info; 176 url::CanonHostInfo host_info;
177 std::string canon_host(net::CanonicalizeHost(quic_hint.host, &host_info)); 177 std::string canon_host(net::CanonicalizeHost(quic_hint.host, &host_info));
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 } 324 }
325 325
326 static jint SetMinLogLevel(JNIEnv* env, jclass jcaller, jint jlog_level) { 326 static jint SetMinLogLevel(JNIEnv* env, jclass jcaller, jint jlog_level) {
327 jint old_log_level = static_cast<jint>(logging::GetMinLogLevel()); 327 jint old_log_level = static_cast<jint>(logging::GetMinLogLevel());
328 // MinLogLevel is global, shared by all URLRequestContexts. 328 // MinLogLevel is global, shared by all URLRequestContexts.
329 logging::SetMinLogLevel(static_cast<int>(jlog_level)); 329 logging::SetMinLogLevel(static_cast<int>(jlog_level));
330 return old_log_level; 330 return old_log_level;
331 } 331 }
332 332
333 } // namespace cronet 333 } // namespace cronet
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698