| 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 1116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1127 globals()->host_resolver->SetDnsClientEnabled(*dns_client_enabled_); | 1127 globals()->host_resolver->SetDnsClientEnabled(*dns_client_enabled_); |
| 1128 } | 1128 } |
| 1129 | 1129 |
| 1130 void IOThread::ConfigureQuic(const CommandLine& command_line) { | 1130 void IOThread::ConfigureQuic(const CommandLine& command_line) { |
| 1131 // Always fetch the field trial group to ensure it is reported correctly. | 1131 // Always fetch the field trial group to ensure it is reported correctly. |
| 1132 // The command line flags will be associated with a group that is reported | 1132 // The command line flags will be associated with a group that is reported |
| 1133 // so long as trial is actually queried. | 1133 // so long as trial is actually queried. |
| 1134 std::string group = | 1134 std::string group = |
| 1135 base::FieldTrialList::FindFullName(kQuicFieldTrialName); | 1135 base::FieldTrialList::FindFullName(kQuicFieldTrialName); |
| 1136 VariationParameters params; | 1136 VariationParameters params; |
| 1137 if (!chrome_variations::GetVariationParams(kQuicFieldTrialName, ¶ms)) { | 1137 if (!variations::GetVariationParams(kQuicFieldTrialName, ¶ms)) { |
| 1138 params.clear(); | 1138 params.clear(); |
| 1139 } | 1139 } |
| 1140 | 1140 |
| 1141 ConfigureQuicGlobals(command_line, group, params, globals_); | 1141 ConfigureQuicGlobals(command_line, group, params, globals_); |
| 1142 } | 1142 } |
| 1143 | 1143 |
| 1144 // static | 1144 // static |
| 1145 void IOThread::ConfigureQuicGlobals( | 1145 void IOThread::ConfigureQuicGlobals( |
| 1146 const base::CommandLine& command_line, | 1146 const base::CommandLine& command_line, |
| 1147 base::StringPiece quic_trial_group, | 1147 base::StringPiece quic_trial_group, |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1381 net::QuicVersionVector supported_versions = net::QuicSupportedVersions(); | 1381 net::QuicVersionVector supported_versions = net::QuicSupportedVersions(); |
| 1382 for (size_t i = 0; i < supported_versions.size(); ++i) { | 1382 for (size_t i = 0; i < supported_versions.size(); ++i) { |
| 1383 net::QuicVersion version = supported_versions[i]; | 1383 net::QuicVersion version = supported_versions[i]; |
| 1384 if (net::QuicVersionToString(version) == quic_version) { | 1384 if (net::QuicVersionToString(version) == quic_version) { |
| 1385 return version; | 1385 return version; |
| 1386 } | 1386 } |
| 1387 } | 1387 } |
| 1388 | 1388 |
| 1389 return net::QUIC_VERSION_UNSUPPORTED; | 1389 return net::QUIC_VERSION_UNSUPPORTED; |
| 1390 } | 1390 } |
| OLD | NEW |