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

Side by Side Diff: trunk/src/chrome/browser/io_thread.cc

Issue 474483002: Revert 289312 "Move StringToUpperASCII and LowerCaseEqualsASCII ..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
OLDNEW
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 1225 matching lines...) Expand 10 before | Expand all | Expand 10 after
1236 bool IOThread::ShouldEnableQuicPacing( 1236 bool IOThread::ShouldEnableQuicPacing(
1237 const CommandLine& command_line, 1237 const CommandLine& command_line,
1238 base::StringPiece quic_trial_group, 1238 base::StringPiece quic_trial_group,
1239 const VariationParameters& quic_trial_params) { 1239 const VariationParameters& quic_trial_params) {
1240 if (command_line.HasSwitch(switches::kEnableQuicPacing)) 1240 if (command_line.HasSwitch(switches::kEnableQuicPacing))
1241 return true; 1241 return true;
1242 1242
1243 if (command_line.HasSwitch(switches::kDisableQuicPacing)) 1243 if (command_line.HasSwitch(switches::kDisableQuicPacing))
1244 return false; 1244 return false;
1245 1245
1246 if (base::LowerCaseEqualsASCII( 1246 if (LowerCaseEqualsASCII(
1247 GetVariationParam(quic_trial_params, "enable_pacing"), 1247 GetVariationParam(quic_trial_params, "enable_pacing"),
1248 "true")) 1248 "true"))
1249 return true; 1249 return true;
1250 1250
1251 return quic_trial_group.ends_with(kQuicFieldTrialPacingSuffix); 1251 return quic_trial_group.ends_with(kQuicFieldTrialPacingSuffix);
1252 } 1252 }
1253 1253
1254 net::QuicTagVector IOThread::GetQuicConnectionOptions( 1254 net::QuicTagVector IOThread::GetQuicConnectionOptions(
1255 const CommandLine& command_line, 1255 const CommandLine& command_line,
1256 const VariationParameters& quic_trial_params) { 1256 const VariationParameters& quic_trial_params) {
1257 if (command_line.HasSwitch(switches::kQuicConnectionOptions)) { 1257 if (command_line.HasSwitch(switches::kQuicConnectionOptions)) {
1258 return ParseQuicConnectionOptions( 1258 return ParseQuicConnectionOptions(
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
1314 bool IOThread::ShouldEnableQuicTimeBasedLossDetection( 1314 bool IOThread::ShouldEnableQuicTimeBasedLossDetection(
1315 const CommandLine& command_line, 1315 const CommandLine& command_line,
1316 base::StringPiece quic_trial_group, 1316 base::StringPiece quic_trial_group,
1317 const VariationParameters& quic_trial_params) { 1317 const VariationParameters& quic_trial_params) {
1318 if (command_line.HasSwitch(switches::kEnableQuicTimeBasedLossDetection)) 1318 if (command_line.HasSwitch(switches::kEnableQuicTimeBasedLossDetection))
1319 return true; 1319 return true;
1320 1320
1321 if (command_line.HasSwitch(switches::kDisableQuicTimeBasedLossDetection)) 1321 if (command_line.HasSwitch(switches::kDisableQuicTimeBasedLossDetection))
1322 return false; 1322 return false;
1323 1323
1324 if (base::LowerCaseEqualsASCII( 1324 if (LowerCaseEqualsASCII(
1325 GetVariationParam(quic_trial_params, 1325 GetVariationParam(quic_trial_params, "enable_time_based_loss_detection"),
1326 "enable_time_based_loss_detection"), 1326 "true"))
1327 "true"))
1328 return true; 1327 return true;
1329 1328
1330 return quic_trial_group.ends_with( 1329 return quic_trial_group.ends_with(
1331 kQuicFieldTrialTimeBasedLossDetectionSuffix); 1330 kQuicFieldTrialTimeBasedLossDetectionSuffix);
1332 } 1331 }
1333 1332
1334 // static 1333 // static
1335 size_t IOThread::GetQuicMaxPacketLength( 1334 size_t IOThread::GetQuicMaxPacketLength(
1336 const CommandLine& command_line, 1335 const CommandLine& command_line,
1337 base::StringPiece quic_trial_group, 1336 base::StringPiece quic_trial_group,
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
1390 net::QuicVersionVector supported_versions = net::QuicSupportedVersions(); 1389 net::QuicVersionVector supported_versions = net::QuicSupportedVersions();
1391 for (size_t i = 0; i < supported_versions.size(); ++i) { 1390 for (size_t i = 0; i < supported_versions.size(); ++i) {
1392 net::QuicVersion version = supported_versions[i]; 1391 net::QuicVersion version = supported_versions[i];
1393 if (net::QuicVersionToString(version) == quic_version) { 1392 if (net::QuicVersionToString(version) == quic_version) {
1394 return version; 1393 return version;
1395 } 1394 }
1396 } 1395 }
1397 1396
1398 return net::QUIC_VERSION_UNSUPPORTED; 1397 return net::QUIC_VERSION_UNSUPPORTED;
1399 } 1398 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698