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 <utility> | 7 #include <utility> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/base64.h" | 10 #include "base/base64.h" |
(...skipping 1433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1444 "receive_buffer_size"), | 1444 "receive_buffer_size"), |
1445 &value)) { | 1445 &value)) { |
1446 return value; | 1446 return value; |
1447 } | 1447 } |
1448 return 0; | 1448 return 0; |
1449 } | 1449 } |
1450 | 1450 |
1451 // static | 1451 // static |
1452 bool IOThread::NetworkSessionConfigurator::ShouldQuicDelayTcpRace( | 1452 bool IOThread::NetworkSessionConfigurator::ShouldQuicDelayTcpRace( |
1453 const VariationParameters& quic_trial_params) { | 1453 const VariationParameters& quic_trial_params) { |
1454 return base::LowerCaseEqualsASCII( | 1454 std::string delay_tcp_race = GetVariationParam(quic_trial_params, |
ramant (doing other things)
2016/05/20 00:00:49
Hi Ryan,
Another option is to rename this parame
Ryan Hamilton
2016/05/20 03:17:27
Yeah, it seems like that would be a better idea.
ramant (doing other things)
2016/05/24 16:52:02
Done.
| |
1455 GetVariationParam(quic_trial_params, "delay_tcp_race"), "true"); | 1455 "delay_tcp_race"); |
1456 // If "delay_tcp_race" parameter is not set, then default it to the default | |
1457 // value which is true. Otherwise, if it is set, then return the value set by | |
1458 // the parameter. | |
1459 return delay_tcp_race.empty() || base::LowerCaseEqualsASCII(delay_tcp_race, | |
1460 "true"); | |
1456 } | 1461 } |
1457 | 1462 |
1458 // static | 1463 // static |
1459 bool IOThread::NetworkSessionConfigurator::ShouldQuicCloseSessionsOnIpChange( | 1464 bool IOThread::NetworkSessionConfigurator::ShouldQuicCloseSessionsOnIpChange( |
1460 const VariationParameters& quic_trial_params) { | 1465 const VariationParameters& quic_trial_params) { |
1461 return base::LowerCaseEqualsASCII( | 1466 return base::LowerCaseEqualsASCII( |
1462 GetVariationParam(quic_trial_params, "close_sessions_on_ip_change"), | 1467 GetVariationParam(quic_trial_params, "close_sessions_on_ip_change"), |
1463 "true"); | 1468 "true"); |
1464 } | 1469 } |
1465 | 1470 |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1707 // TODO(rtenneti): We should probably use HttpServerPropertiesManager for the | 1712 // TODO(rtenneti): We should probably use HttpServerPropertiesManager for the |
1708 // system URLRequestContext too. There's no reason this should be tied to a | 1713 // system URLRequestContext too. There's no reason this should be tied to a |
1709 // profile. | 1714 // profile. |
1710 return context; | 1715 return context; |
1711 } | 1716 } |
1712 | 1717 |
1713 const metrics::UpdateUsagePrefCallbackType& | 1718 const metrics::UpdateUsagePrefCallbackType& |
1714 IOThread::GetMetricsDataUseForwarder() { | 1719 IOThread::GetMetricsDataUseForwarder() { |
1715 return metrics_data_use_forwarder_; | 1720 return metrics_data_use_forwarder_; |
1716 } | 1721 } |
OLD | NEW |