OLD | NEW |
---|---|
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 "chrome/browser/io_thread.h" | 5 #include "chrome/browser/io_thread.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/base64.h" | 9 #include "base/base64.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
129 // * A "holdback" group with SPDY disabled, and corresponding control | 129 // * A "holdback" group with SPDY disabled, and corresponding control |
130 // (SPDY/3.1). The primary purpose of the holdback group is to encourage site | 130 // (SPDY/3.1). The primary purpose of the holdback group is to encourage site |
131 // operators to do feature detection rather than UA-sniffing. As such, this | 131 // operators to do feature detection rather than UA-sniffing. As such, this |
132 // trial runs continuously. | 132 // trial runs continuously. |
133 // * A SPDY/4 experiment, for SPDY/4 (aka HTTP/2) vs SPDY/3.1 comparisons and | 133 // * A SPDY/4 experiment, for SPDY/4 (aka HTTP/2) vs SPDY/3.1 comparisons and |
134 // eventual SPDY/4 deployment. | 134 // eventual SPDY/4 deployment. |
135 const char kSpdyFieldTrialName[] = "SPDY"; | 135 const char kSpdyFieldTrialName[] = "SPDY"; |
136 const char kSpdyFieldTrialHoldbackGroupNamePrefix[] = "SpdyDisabled"; | 136 const char kSpdyFieldTrialHoldbackGroupNamePrefix[] = "SpdyDisabled"; |
137 const char kSpdyFieldTrialSpdy31GroupNamePrefix[] = "Spdy31Enabled"; | 137 const char kSpdyFieldTrialSpdy31GroupNamePrefix[] = "Spdy31Enabled"; |
138 const char kSpdyFieldTrialSpdy4GroupNamePrefix[] = "Spdy4Enabled"; | 138 const char kSpdyFieldTrialSpdy4GroupNamePrefix[] = "Spdy4Enabled"; |
139 const char kSpdyFieldTrialParametrizedPrefix[] = "Parametrized"; | |
139 | 140 |
140 // Field trial for Cache-Control: stale-while-revalidate directive. | 141 // Field trial for Cache-Control: stale-while-revalidate directive. |
141 const char kStaleWhileRevalidateFieldTrialName[] = "StaleWhileRevalidate"; | 142 const char kStaleWhileRevalidateFieldTrialName[] = "StaleWhileRevalidate"; |
142 | 143 |
143 #if defined(OS_MACOSX) && !defined(OS_IOS) | 144 #if defined(OS_MACOSX) && !defined(OS_IOS) |
144 void ObserveKeychainEvents() { | 145 void ObserveKeychainEvents() { |
145 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 146 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
146 net::CertDatabase::GetInstance()->SetMessageLoopForKeychainEvents(); | 147 net::CertDatabase::GetInstance()->SetMessageLoopForKeychainEvents(); |
147 } | 148 } |
148 #endif | 149 #endif |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
312 const base::CommandLine& command_line) { | 313 const base::CommandLine& command_line) { |
313 const std::string group_name = | 314 const std::string group_name = |
314 base::FieldTrialList::FindFullName("CTRequiredForEVTrial"); | 315 base::FieldTrialList::FindFullName("CTRequiredForEVTrial"); |
315 if (command_line.HasSwitch( | 316 if (command_line.HasSwitch( |
316 switches::kDisableCertificateTransparencyRequirementForEV)) | 317 switches::kDisableCertificateTransparencyRequirementForEV)) |
317 return false; | 318 return false; |
318 | 319 |
319 return group_name == "RequirementEnforced"; | 320 return group_name == "RequirementEnforced"; |
320 } | 321 } |
321 | 322 |
323 // Parse kUseSpdy command line flag options, which may contain the following: | |
324 // | |
325 // "off" : Disables SPDY support entirely. | |
326 // "ssl" : Forces SPDY for all HTTPS requests. | |
327 // "no-ssl" : Forces SPDY for all HTTP requests. | |
328 // "no-ping" : Disables SPDY ping connection testing. | |
329 // "exclude=<host>" : Disables SPDY support for the host <host>. | |
330 // "no-compress" : Disables SPDY header compression. | |
331 // "no-alt-protocols : Disables alternate protocol support. | |
332 // "force-alt-protocols : Forces an alternate protocol of SPDY/3 | |
333 // on port 443. | |
334 // "single-domain" : Forces all spdy traffic to a single domain. | |
335 // "init-max-streams=<limit>" : Specifies the maximum number of concurrent | |
336 // streams for a SPDY session, unless the | |
337 // specifies a different value via SETTINGS. | |
338 void ConfigureSpdyGlobalsFromUseSpdyArgument(const std::string& mode, | |
339 IOThread::Globals* globals) { | |
340 static const char kOff[] = "off"; | |
341 static const char kSSL[] = "ssl"; | |
342 static const char kDisableSSL[] = "no-ssl"; | |
343 static const char kDisablePing[] = "no-ping"; | |
344 static const char kExclude[] = "exclude"; // Hosts to exclude | |
345 static const char kDisableCompression[] = "no-compress"; | |
346 static const char kDisableAltProtocols[] = "no-alt-protocols"; | |
347 static const char kForceAltProtocols[] = "force-alt-protocols"; | |
348 static const char kSingleDomain[] = "single-domain"; | |
349 | |
350 static const char kInitialMaxConcurrentStreams[] = "init-max-streams"; | |
351 | |
352 std::vector<std::string> spdy_options; | |
353 base::SplitString(mode, ',', &spdy_options); | |
354 | |
355 for (std::vector<std::string>::iterator it = spdy_options.begin(); | |
356 it != spdy_options.end(); ++it) { | |
Ryan Hamilton
2015/03/23 21:29:14
nit: for (const std::string& element : spdy_option
Bence
2015/03/24 14:05:04
Done.
| |
357 const std::string& element = *it; | |
358 std::vector<std::string> name_value; | |
359 base::SplitString(element, '=', &name_value); | |
360 const std::string& option = | |
361 name_value.size() > 0 ? name_value[0] : std::string(); | |
362 const std::string value = | |
363 name_value.size() > 1 ? name_value[1] : std::string(); | |
364 | |
365 if (option == kOff) { | |
366 net::HttpStreamFactory::set_spdy_enabled(false); | |
367 continue; | |
368 } | |
369 if (option == kDisableSSL) { | |
370 globals->spdy_default_protocol.set(net::kProtoSPDY31); | |
371 globals->force_spdy_over_ssl.set(false); | |
372 globals->force_spdy_always.set(true); | |
373 continue; | |
374 } | |
375 if (option == kSSL) { | |
376 globals->spdy_default_protocol.set(net::kProtoSPDY31); | |
377 globals->force_spdy_over_ssl.set(true); | |
378 globals->force_spdy_always.set(true); | |
379 continue; | |
380 } | |
381 if (option == kDisablePing) { | |
382 globals->enable_spdy_ping_based_connection_checking.set(false); | |
383 continue; | |
384 } | |
385 if (option == kExclude) { | |
386 globals->forced_spdy_exclusions.insert( | |
387 net::HostPortPair::FromURL(GURL(value))); | |
388 continue; | |
389 } | |
390 if (option == kDisableCompression) { | |
391 globals->enable_spdy_compression.set(false); | |
392 continue; | |
393 } | |
394 if (option == kDisableAltProtocols) { | |
395 globals->use_alternate_protocols.set(false); | |
396 continue; | |
397 } | |
398 if (option == kForceAltProtocols) { | |
399 net::AlternateProtocolInfo pair(443, net::NPN_SPDY_3, 1); | |
400 net::HttpServerPropertiesImpl::ForceAlternateProtocol(pair); | |
401 continue; | |
402 } | |
403 if (option == kSingleDomain) { | |
404 DVLOG(1) << "FORCING SINGLE DOMAIN"; | |
405 globals->force_spdy_single_domain.set(true); | |
406 continue; | |
Ryan Hamilton
2015/03/23 21:29:13
I'd love to see these two options killed. :>
| |
407 } | |
408 if (option == kInitialMaxConcurrentStreams) { | |
409 int streams; | |
410 if (base::StringToInt(value, &streams)) { | |
411 globals->initial_max_spdy_concurrent_streams.set(streams); | |
412 } | |
413 continue; | |
Ryan Hamilton
2015/03/23 21:29:13
perhaps this belongs inside the {} so that if the
Bence
2015/03/24 14:05:03
Done.
| |
414 } | |
415 if (option.empty() && it == spdy_options.begin()) { | |
416 continue; | |
417 } | |
Ryan Hamilton
2015/03/23 21:29:13
I can't quite work out if this is required. Can yo
Bence
2015/03/24 14:05:03
I have no idea either, so I'm removing it.
| |
418 LOG(DFATAL) << "Unrecognized spdy option: " << option; | |
419 } | |
420 } | |
421 | |
322 } // namespace | 422 } // namespace |
323 | 423 |
324 class IOThread::LoggingNetworkChangeObserver | 424 class IOThread::LoggingNetworkChangeObserver |
325 : public net::NetworkChangeNotifier::IPAddressObserver, | 425 : public net::NetworkChangeNotifier::IPAddressObserver, |
326 public net::NetworkChangeNotifier::ConnectionTypeObserver, | 426 public net::NetworkChangeNotifier::ConnectionTypeObserver, |
327 public net::NetworkChangeNotifier::NetworkChangeObserver { | 427 public net::NetworkChangeNotifier::NetworkChangeObserver { |
328 public: | 428 public: |
329 // |net_log| must remain valid throughout our lifetime. | 429 // |net_log| must remain valid throughout our lifetime. |
330 explicit LoggingNetworkChangeObserver(net::NetLog* net_log) | 430 explicit LoggingNetworkChangeObserver(net::NetLog* net_log) |
331 : net_log_(net_log) { | 431 : net_log_(net_log) { |
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
858 } | 958 } |
859 | 959 |
860 void IOThread::InitializeNetworkOptions(const base::CommandLine& command_line) { | 960 void IOThread::InitializeNetworkOptions(const base::CommandLine& command_line) { |
861 // Only handle use-spdy command line flags if "spdy.disabled" preference is | 961 // Only handle use-spdy command line flags if "spdy.disabled" preference is |
862 // not disabled via policy. | 962 // not disabled via policy. |
863 if (is_spdy_disabled_by_policy_) { | 963 if (is_spdy_disabled_by_policy_) { |
864 base::FieldTrial* trial = base::FieldTrialList::Find(kSpdyFieldTrialName); | 964 base::FieldTrial* trial = base::FieldTrialList::Find(kSpdyFieldTrialName); |
865 if (trial) | 965 if (trial) |
866 trial->Disable(); | 966 trial->Disable(); |
867 } else { | 967 } else { |
868 if (command_line.HasSwitch(switches::kTrustedSpdyProxy)) { | 968 std::string group = base::FieldTrialList::FindFullName(kSpdyFieldTrialName); |
869 globals_->trusted_spdy_proxy.set( | 969 VariationParameters params; |
870 command_line.GetSwitchValueASCII(switches::kTrustedSpdyProxy)); | 970 if (!variations::GetVariationParams(kSpdyFieldTrialName, ¶ms)) { |
971 params.clear(); | |
871 } | 972 } |
872 if (command_line.HasSwitch(switches::kIgnoreUrlFetcherCertRequests)) | 973 ConfigureSpdyGlobals(command_line, group, params, globals_); |
873 net::URLFetcher::SetIgnoreCertificateRequests(true); | |
874 | |
875 if (command_line.HasSwitch(switches::kUseSpdy)) { | |
876 std::string spdy_mode = | |
877 command_line.GetSwitchValueASCII(switches::kUseSpdy); | |
878 EnableSpdy(spdy_mode); | |
879 } else if (command_line.HasSwitch(switches::kEnableSpdy4)) { | |
880 globals_->next_protos = net::NextProtosSpdy4Http2(); | |
881 globals_->use_alternate_protocols.set(true); | |
882 } else if (command_line.HasSwitch(switches::kEnableNpnHttpOnly)) { | |
883 globals_->next_protos = net::NextProtosHttpOnly(); | |
884 globals_->use_alternate_protocols.set(false); | |
885 } else { | |
886 // No SPDY command-line flags have been specified. Examine trial groups. | |
887 ConfigureSpdyFromTrial( | |
888 base::FieldTrialList::FindFullName(kSpdyFieldTrialName), globals_); | |
889 } | |
890 } | 974 } |
891 | 975 |
892 ConfigureTCPFastOpen(command_line); | 976 ConfigureTCPFastOpen(command_line); |
893 ConfigureSdch(); | 977 ConfigureSdch(); |
894 | 978 |
895 // TODO(rch): Make the client socket factory a per-network session | 979 // TODO(rch): Make the client socket factory a per-network session |
896 // instance, constructed from a NetworkSession::Params, to allow us | 980 // instance, constructed from a NetworkSession::Params, to allow us |
897 // to move this option to IOThread::Globals & | 981 // to move this option to IOThread::Globals & |
898 // HttpNetworkSession::Params. | 982 // HttpNetworkSession::Params. |
899 } | 983 } |
(...skipping 23 matching lines...) Expand all Loading... | |
923 base::FieldTrialList::FindFullName(kSdchFieldTrialName); | 1007 base::FieldTrialList::FindFullName(kSdchFieldTrialName); |
924 base::StringPiece sdch_trial_group(sdch_trial_group_string); | 1008 base::StringPiece sdch_trial_group(sdch_trial_group_string); |
925 if (sdch_trial_group.starts_with(kEnabledHttpOnlyGroupName)) { | 1009 if (sdch_trial_group.starts_with(kEnabledHttpOnlyGroupName)) { |
926 net::SdchManager::EnableSdchSupport(true); | 1010 net::SdchManager::EnableSdchSupport(true); |
927 net::SdchManager::EnableSecureSchemeSupport(false); | 1011 net::SdchManager::EnableSecureSchemeSupport(false); |
928 } else if (sdch_trial_group.starts_with(kDisabledAllGroupName)) { | 1012 } else if (sdch_trial_group.starts_with(kDisabledAllGroupName)) { |
929 net::SdchManager::EnableSdchSupport(false); | 1013 net::SdchManager::EnableSdchSupport(false); |
930 } | 1014 } |
931 } | 1015 } |
932 | 1016 |
933 void IOThread::ConfigureSpdyFromTrial(base::StringPiece spdy_trial_group, | |
934 Globals* globals) { | |
935 if (spdy_trial_group.starts_with(kSpdyFieldTrialHoldbackGroupNamePrefix)) { | |
936 // TODO(jgraettinger): Use net::NextProtosHttpOnly() instead? | |
937 net::HttpStreamFactory::set_spdy_enabled(false); | |
938 } else if (spdy_trial_group.starts_with( | |
939 kSpdyFieldTrialSpdy31GroupNamePrefix)) { | |
940 globals->next_protos = net::NextProtosSpdy31(); | |
941 globals->use_alternate_protocols.set(true); | |
942 } else if (spdy_trial_group.starts_with( | |
943 kSpdyFieldTrialSpdy4GroupNamePrefix)) { | |
944 globals->next_protos = net::NextProtosSpdy4Http2(); | |
945 globals->use_alternate_protocols.set(true); | |
946 } else { | |
947 // By default, enable HTTP/2. | |
948 globals->next_protos = net::NextProtosSpdy4Http2(); | |
949 globals->use_alternate_protocols.set(true); | |
950 } | |
951 } | |
952 | |
953 void IOThread::EnableSpdy(const std::string& mode) { | |
954 static const char kOff[] = "off"; | |
955 static const char kSSL[] = "ssl"; | |
956 static const char kDisableSSL[] = "no-ssl"; | |
957 static const char kDisablePing[] = "no-ping"; | |
958 static const char kExclude[] = "exclude"; // Hosts to exclude | |
959 static const char kDisableCompression[] = "no-compress"; | |
960 static const char kDisableAltProtocols[] = "no-alt-protocols"; | |
961 static const char kForceAltProtocols[] = "force-alt-protocols"; | |
962 static const char kSingleDomain[] = "single-domain"; | |
963 | |
964 static const char kInitialMaxConcurrentStreams[] = "init-max-streams"; | |
965 | |
966 std::vector<std::string> spdy_options; | |
967 base::SplitString(mode, ',', &spdy_options); | |
968 | |
969 for (std::vector<std::string>::iterator it = spdy_options.begin(); | |
970 it != spdy_options.end(); ++it) { | |
971 const std::string& element = *it; | |
972 std::vector<std::string> name_value; | |
973 base::SplitString(element, '=', &name_value); | |
974 const std::string& option = | |
975 name_value.size() > 0 ? name_value[0] : std::string(); | |
976 const std::string value = | |
977 name_value.size() > 1 ? name_value[1] : std::string(); | |
978 | |
979 if (option == kOff) { | |
980 net::HttpStreamFactory::set_spdy_enabled(false); | |
981 } else if (option == kDisableSSL) { | |
982 globals_->spdy_default_protocol.set(net::kProtoSPDY31); | |
983 globals_->force_spdy_over_ssl.set(false); | |
984 globals_->force_spdy_always.set(true); | |
985 } else if (option == kSSL) { | |
986 globals_->spdy_default_protocol.set(net::kProtoSPDY31); | |
987 globals_->force_spdy_over_ssl.set(true); | |
988 globals_->force_spdy_always.set(true); | |
989 } else if (option == kDisablePing) { | |
990 globals_->enable_spdy_ping_based_connection_checking.set(false); | |
991 } else if (option == kExclude) { | |
992 globals_->forced_spdy_exclusions.insert( | |
993 net::HostPortPair::FromURL(GURL(value))); | |
994 } else if (option == kDisableCompression) { | |
995 globals_->enable_spdy_compression.set(false); | |
996 } else if (option == kDisableAltProtocols) { | |
997 globals_->use_alternate_protocols.set(false); | |
998 } else if (option == kForceAltProtocols) { | |
999 net::AlternateProtocolInfo pair(443, net::NPN_SPDY_3, 1); | |
1000 net::HttpServerPropertiesImpl::ForceAlternateProtocol(pair); | |
1001 } else if (option == kSingleDomain) { | |
1002 DVLOG(1) << "FORCING SINGLE DOMAIN"; | |
1003 globals_->force_spdy_single_domain.set(true); | |
1004 } else if (option == kInitialMaxConcurrentStreams) { | |
1005 int streams; | |
1006 if (base::StringToInt(value, &streams)) | |
1007 globals_->initial_max_spdy_concurrent_streams.set(streams); | |
1008 } else if (option.empty() && it == spdy_options.begin()) { | |
1009 continue; | |
1010 } else { | |
1011 LOG(DFATAL) << "Unrecognized spdy option: " << option; | |
1012 } | |
1013 } | |
1014 } | |
1015 | |
1016 // static | 1017 // static |
1018 void IOThread::ConfigureSpdyGlobals( | |
1019 const base::CommandLine& command_line, | |
1020 base::StringPiece spdy_trial_group, | |
1021 const VariationParameters& spdy_trial_params, | |
1022 IOThread::Globals* globals) { | |
1023 if (command_line.HasSwitch(switches::kTrustedSpdyProxy)) { | |
1024 globals->trusted_spdy_proxy.set( | |
1025 command_line.GetSwitchValueASCII(switches::kTrustedSpdyProxy)); | |
1026 } | |
1027 if (command_line.HasSwitch(switches::kIgnoreUrlFetcherCertRequests)) | |
1028 net::URLFetcher::SetIgnoreCertificateRequests(true); | |
1029 | |
1030 if (command_line.HasSwitch(switches::kUseSpdy)) { | |
1031 std::string spdy_mode = | |
1032 command_line.GetSwitchValueASCII(switches::kUseSpdy); | |
1033 ConfigureSpdyGlobalsFromUseSpdyArgument(spdy_mode, globals); | |
1034 return; | |
1035 } | |
1036 | |
1037 globals->next_protos.clear(); | |
1038 globals->next_protos.push_back(net::kProtoHTTP11); | |
1039 bool enable_quic = false; | |
1040 globals->enable_quic.CopyToIfSet(&enable_quic); | |
1041 if (enable_quic) { | |
1042 globals->next_protos.push_back(net::kProtoQUIC1SPDY3); | |
1043 } | |
1044 | |
1045 if (command_line.HasSwitch(switches::kEnableSpdy4)) { | |
1046 globals->next_protos.push_back(net::kProtoSPDY31); | |
1047 globals->next_protos.push_back(net::kProtoSPDY4_14); | |
1048 globals->next_protos.push_back(net::kProtoSPDY4); | |
1049 globals->use_alternate_protocols.set(true); | |
1050 return; | |
1051 } | |
1052 if (command_line.HasSwitch(switches::kEnableNpnHttpOnly)) { | |
1053 globals->use_alternate_protocols.set(false); | |
1054 return; | |
1055 } | |
1056 | |
1057 // No SPDY command-line flags have been specified. Examine trial groups. | |
1058 if (spdy_trial_group.starts_with(kSpdyFieldTrialHoldbackGroupNamePrefix)) { | |
1059 net::HttpStreamFactory::set_spdy_enabled(false); | |
1060 return; | |
1061 } | |
1062 if (spdy_trial_group.starts_with(kSpdyFieldTrialSpdy31GroupNamePrefix)) { | |
1063 globals->next_protos.push_back(net::kProtoSPDY31); | |
1064 globals->use_alternate_protocols.set(true); | |
1065 return; | |
1066 } | |
1067 if (spdy_trial_group.starts_with(kSpdyFieldTrialSpdy4GroupNamePrefix)) { | |
1068 globals->next_protos.push_back(net::kProtoSPDY31); | |
1069 globals->next_protos.push_back(net::kProtoSPDY4_14); | |
1070 globals->next_protos.push_back(net::kProtoSPDY4); | |
1071 globals->use_alternate_protocols.set(true); | |
1072 return; | |
1073 } | |
1074 if (spdy_trial_group.starts_with(kSpdyFieldTrialParametrizedPrefix)) { | |
1075 if (LowerCaseEqualsASCII( | |
1076 GetVariationParam(spdy_trial_params, "enable_spdy31"), "true")) { | |
1077 globals->next_protos.push_back(net::kProtoSPDY31); | |
1078 } | |
1079 if (LowerCaseEqualsASCII( | |
1080 GetVariationParam(spdy_trial_params, "h2_14_enabled"), "true")) { | |
1081 globals->next_protos.push_back(net::kProtoSPDY4_14); | |
1082 } | |
1083 if (LowerCaseEqualsASCII(GetVariationParam(spdy_trial_params, "h2_enabled"), | |
Ryan Hamilton
2015/03/23 21:29:13
I recommend you make all 3 use the same format:
*
Bence
2015/03/24 14:05:03
Sorry, that was an oversite on my part.
Done.
| |
1084 "true")) { | |
1085 globals->next_protos.push_back(net::kProtoSPDY4); | |
1086 } | |
1087 globals->use_alternate_protocols.set(true); | |
Ryan Hamilton
2015/03/23 21:29:14
Does this mean there's no way to use the Parameter
Bence
2015/03/24 14:05:03
Might we? The primary goal for this functionality
| |
1088 return; | |
1089 } | |
1090 | |
1091 // By default, enable HTTP/2. | |
1092 globals->next_protos.push_back(net::kProtoSPDY31); | |
1093 globals->next_protos.push_back(net::kProtoSPDY4_14); | |
1094 globals->next_protos.push_back(net::kProtoSPDY4); | |
1095 globals->use_alternate_protocols.set(true); | |
1096 } | |
1097 | |
1098 // static | |
1017 void IOThread::RegisterPrefs(PrefRegistrySimple* registry) { | 1099 void IOThread::RegisterPrefs(PrefRegistrySimple* registry) { |
1018 registry->RegisterStringPref(prefs::kAuthSchemes, | 1100 registry->RegisterStringPref(prefs::kAuthSchemes, |
1019 "basic,digest,ntlm,negotiate," | 1101 "basic,digest,ntlm,negotiate," |
1020 "spdyproxy"); | 1102 "spdyproxy"); |
1021 registry->RegisterBooleanPref(prefs::kDisableAuthNegotiateCnameLookup, false); | 1103 registry->RegisterBooleanPref(prefs::kDisableAuthNegotiateCnameLookup, false); |
1022 registry->RegisterBooleanPref(prefs::kEnableAuthNegotiatePort, false); | 1104 registry->RegisterBooleanPref(prefs::kEnableAuthNegotiatePort, false); |
1023 registry->RegisterStringPref(prefs::kAuthServerWhitelist, std::string()); | 1105 registry->RegisterStringPref(prefs::kAuthServerWhitelist, std::string()); |
1024 registry->RegisterStringPref(prefs::kAuthNegotiateDelegateWhitelist, | 1106 registry->RegisterStringPref(prefs::kAuthNegotiateDelegateWhitelist, |
1025 std::string()); | 1107 std::string()); |
1026 registry->RegisterStringPref(prefs::kGSSAPILibraryName, std::string()); | 1108 registry->RegisterStringPref(prefs::kGSSAPILibraryName, std::string()); |
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1514 net::QuicVersionVector supported_versions = net::QuicSupportedVersions(); | 1596 net::QuicVersionVector supported_versions = net::QuicSupportedVersions(); |
1515 for (size_t i = 0; i < supported_versions.size(); ++i) { | 1597 for (size_t i = 0; i < supported_versions.size(); ++i) { |
1516 net::QuicVersion version = supported_versions[i]; | 1598 net::QuicVersion version = supported_versions[i]; |
1517 if (net::QuicVersionToString(version) == quic_version) { | 1599 if (net::QuicVersionToString(version) == quic_version) { |
1518 return version; | 1600 return version; |
1519 } | 1601 } |
1520 } | 1602 } |
1521 | 1603 |
1522 return net::QUIC_VERSION_UNSUPPORTED; | 1604 return net::QUIC_VERSION_UNSUPPORTED; |
1523 } | 1605 } |
OLD | NEW |