Chromium Code Reviews| Index: components/data_reduction_proxy/browser/data_reduction_proxy_params.cc |
| diff --git a/components/data_reduction_proxy/browser/data_reduction_proxy_params.cc b/components/data_reduction_proxy/browser/data_reduction_proxy_params.cc |
| index 3088e083eabe41bbfde98532a6d12f9ec78fc1fd..1af13b01d6e40835418075ca9725462d102488c6 100644 |
| --- a/components/data_reduction_proxy/browser/data_reduction_proxy_params.cc |
| +++ b/components/data_reduction_proxy/browser/data_reduction_proxy_params.cc |
| @@ -253,6 +253,8 @@ void DataReductionProxyParams::InitWithoutChecks() { |
| if (origin.empty()) |
| origin = GetDefaultOrigin(); |
| if (fallback_origin.empty()) |
| + fallback_origin = GetDefaultDevFallbackOrigin(); |
| + if (fallback_origin.empty()) |
| fallback_origin = GetDefaultFallbackOrigin(); |
| if (ssl_origin.empty()) |
| ssl_origin = GetDefaultSSLOrigin(); |
| @@ -396,6 +398,20 @@ std::string DataReductionProxyParams::GetDefaultDevOrigin() const { |
| return std::string(); |
| } |
| +std::string DataReductionProxyParams::GetDefaultDevFallbackOrigin() const { |
| +#if defined(DATA_REDUCTION_DEV_FALLBACK_HOST) |
| + const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
| + if (command_line.HasSwitch(switches::kDisableDataReductionProxyDev)) |
| + return std::string(); |
| + if (command_line.HasSwitch(switches::kEnableDataReductionProxyDev) || |
| + (FieldTrialList::FindFullName("DataCompressionProxyDevRollout") == |
| + kEnabled)) { |
|
bengr
2014/09/09 19:17:56
indent 2 more, or move "DataCompressionProxyDevRol
bolian
2014/09/09 20:32:51
Done.
|
| + return DATA_REDUCTION_DEV_FALLBACK_HOST; |
| + } |
| +#endif |
| + return std::string(); |
| +} |
| + |
| bool DataReductionProxyParams::AreDataReductionProxiesBypassed( |
| const net::URLRequest& request, base::TimeDelta* min_retry_delay) const { |
| if (request.context() != NULL && |