OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "components/data_reduction_proxy/core/browser/data_reduction_proxy_sett ings.h" | 5 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_sett ings.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/metrics/field_trial.h" | 9 #include "base/metrics/field_trial.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
143 RecordDataReductionInit(); | 143 RecordDataReductionInit(); |
144 | 144 |
145 // Disable the proxy if it is not allowed to be used. | 145 // Disable the proxy if it is not allowed to be used. |
146 if (!params()->allowed()) | 146 if (!params()->allowed()) |
147 return; | 147 return; |
148 | 148 |
149 AddDefaultProxyBypassRules(); | 149 AddDefaultProxyBypassRules(); |
150 net::NetworkChangeNotifier::AddIPAddressObserver(this); | 150 net::NetworkChangeNotifier::AddIPAddressObserver(this); |
151 } | 151 } |
152 | 152 |
153 void DataReductionProxySettings::EnableQUIC( | |
154 bool quic_enabled_for_proxies) { | |
155 params()->EnableQUIC(quic_enabled_for_proxies); | |
bengr
2015/02/11 23:57:28
DCHECK(params())
tbansal1
2015/02/12 02:27:21
Done.
| |
156 } | |
157 | |
153 void DataReductionProxySettings::SetDataReductionProxyStatisticsPrefs( | 158 void DataReductionProxySettings::SetDataReductionProxyStatisticsPrefs( |
154 DataReductionProxyStatisticsPrefs* statistics_prefs) { | 159 DataReductionProxyStatisticsPrefs* statistics_prefs) { |
155 statistics_prefs_ = statistics_prefs; | 160 statistics_prefs_ = statistics_prefs; |
156 } | 161 } |
157 | 162 |
158 void DataReductionProxySettings::SetOnDataReductionEnabledCallback( | 163 void DataReductionProxySettings::SetOnDataReductionEnabledCallback( |
159 const base::Callback<void(bool)>& on_data_reduction_proxy_enabled) { | 164 const base::Callback<void(bool)>& on_data_reduction_proxy_enabled) { |
160 on_data_reduction_proxy_enabled_ = on_data_reduction_proxy_enabled; | 165 on_data_reduction_proxy_enabled_ = on_data_reduction_proxy_enabled; |
161 on_data_reduction_proxy_enabled_.Run(IsDataReductionProxyEnabled()); | 166 on_data_reduction_proxy_enabled_.Run(IsDataReductionProxyEnabled()); |
162 } | 167 } |
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
603 SetProxyConfigs(enabled_by_user_, | 608 SetProxyConfigs(enabled_by_user_, |
604 IsDataReductionProxyAlternativeEnabled(), | 609 IsDataReductionProxyAlternativeEnabled(), |
605 restricted_by_carrier_, | 610 restricted_by_carrier_, |
606 false); | 611 false); |
607 } | 612 } |
608 disabled_on_vpn_ = false; | 613 disabled_on_vpn_ = false; |
609 return false; | 614 return false; |
610 } | 615 } |
611 | 616 |
612 } // namespace data_reduction_proxy | 617 } // namespace data_reduction_proxy |
OLD | NEW |