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

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

Issue 903213003: Enable QUIC for proxies based on Finch config and command line switch. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « no previous file | components/data_reduction_proxy/core/common/data_reduction_proxy_params.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1208 matching lines...) Expand 10 before | Expand all | Expand 10 after
1219 1219
1220 bool IOThread::ShouldEnableQuic(const base::CommandLine& command_line, 1220 bool IOThread::ShouldEnableQuic(const base::CommandLine& command_line,
1221 base::StringPiece quic_trial_group) { 1221 base::StringPiece quic_trial_group) {
1222 if (command_line.HasSwitch(switches::kDisableQuic)) 1222 if (command_line.HasSwitch(switches::kDisableQuic))
1223 return false; 1223 return false;
1224 1224
1225 if (command_line.HasSwitch(switches::kEnableQuic)) 1225 if (command_line.HasSwitch(switches::kEnableQuic))
1226 return true; 1226 return true;
1227 1227
1228 return quic_trial_group.starts_with(kQuicFieldTrialEnabledGroupName) || 1228 return quic_trial_group.starts_with(kQuicFieldTrialEnabledGroupName) ||
1229 quic_trial_group.starts_with(kQuicFieldTrialHttpsEnabledGroupName); 1229 quic_trial_group.starts_with(kQuicFieldTrialHttpsEnabledGroupName) ||
1230 base::FieldTrialList::FindFullName(
1231 "DataReductionProxyUseQUICAsPrimaryOrigin") == "Enabled";
Ryan Hamilton 2015/02/06 22:23:52 Ah, I see. Hm, I'm not super in love this this. Th
1230 } 1232 }
1231 1233
1232 bool IOThread::ShouldEnableQuicPortSelection( 1234 bool IOThread::ShouldEnableQuicPortSelection(
1233 const base::CommandLine& command_line) { 1235 const base::CommandLine& command_line) {
1234 if (command_line.HasSwitch(switches::kDisableQuicPortSelection)) 1236 if (command_line.HasSwitch(switches::kDisableQuicPortSelection))
1235 return false; 1237 return false;
1236 1238
1237 if (command_line.HasSwitch(switches::kEnableQuicPortSelection)) 1239 if (command_line.HasSwitch(switches::kEnableQuicPortSelection))
1238 return true; 1240 return true;
1239 1241
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
1386 net::QuicVersionVector supported_versions = net::QuicSupportedVersions(); 1388 net::QuicVersionVector supported_versions = net::QuicSupportedVersions();
1387 for (size_t i = 0; i < supported_versions.size(); ++i) { 1389 for (size_t i = 0; i < supported_versions.size(); ++i) {
1388 net::QuicVersion version = supported_versions[i]; 1390 net::QuicVersion version = supported_versions[i];
1389 if (net::QuicVersionToString(version) == quic_version) { 1391 if (net::QuicVersionToString(version) == quic_version) {
1390 return version; 1392 return version;
1391 } 1393 }
1392 } 1394 }
1393 1395
1394 return net::QUIC_VERSION_UNSUPPORTED; 1396 return net::QUIC_VERSION_UNSUPPORTED;
1395 } 1397 }
OLDNEW
« no previous file with comments | « no previous file | components/data_reduction_proxy/core/common/data_reduction_proxy_params.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698