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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
123 GetOriginalProfilePrefs(), | 123 GetOriginalProfilePrefs(), |
124 base::Bind( | 124 base::Bind( |
125 &DataReductionProxySettings::OnProxyAlternativeEnabledPrefChange, | 125 &DataReductionProxySettings::OnProxyAlternativeEnabledPrefChange, |
126 base::Unretained(this))); | 126 base::Unretained(this))); |
127 } | 127 } |
128 | 128 |
129 void DataReductionProxySettings::InitDataReductionProxySettings( | 129 void DataReductionProxySettings::InitDataReductionProxySettings( |
130 PrefService* prefs, | 130 PrefService* prefs, |
131 net::URLRequestContextGetter* url_request_context_getter, | 131 net::URLRequestContextGetter* url_request_context_getter, |
132 net::NetLog* net_log, | 132 net::NetLog* net_log, |
133 DataReductionProxyEventStore* event_store) { | 133 DataReductionProxyEventStore* event_store, |
134 bool quic_enabled_for_proxies) { | |
bengr
2015/02/10 20:18:31
I weakly prefer adding EnableQUIC instead of addin
tbansal1
2015/02/10 22:24:38
Done.
| |
134 DCHECK(thread_checker_.CalledOnValidThread()); | 135 DCHECK(thread_checker_.CalledOnValidThread()); |
135 DCHECK(prefs); | 136 DCHECK(prefs); |
136 DCHECK(url_request_context_getter); | 137 DCHECK(url_request_context_getter); |
137 DCHECK(event_store); | 138 DCHECK(event_store); |
138 prefs_ = prefs; | 139 prefs_ = prefs; |
139 url_request_context_getter_ = url_request_context_getter; | 140 url_request_context_getter_ = url_request_context_getter; |
140 net_log_ = net_log; | 141 net_log_ = net_log; |
141 event_store_ = event_store; | 142 event_store_ = event_store; |
142 InitPrefMembers(); | 143 InitPrefMembers(); |
143 RecordDataReductionInit(); | 144 RecordDataReductionInit(); |
144 | 145 |
146 params()->SetIsQuicEnabledForProxies(quic_enabled_for_proxies); | |
147 | |
145 // Disable the proxy if it is not allowed to be used. | 148 // Disable the proxy if it is not allowed to be used. |
146 if (!params()->allowed()) | 149 if (!params()->allowed()) |
147 return; | 150 return; |
148 | 151 |
149 AddDefaultProxyBypassRules(); | 152 AddDefaultProxyBypassRules(); |
150 net::NetworkChangeNotifier::AddIPAddressObserver(this); | 153 net::NetworkChangeNotifier::AddIPAddressObserver(this); |
151 } | 154 } |
152 | 155 |
153 void DataReductionProxySettings::SetDataReductionProxyStatisticsPrefs( | 156 void DataReductionProxySettings::SetDataReductionProxyStatisticsPrefs( |
154 DataReductionProxyStatisticsPrefs* statistics_prefs) { | 157 DataReductionProxyStatisticsPrefs* statistics_prefs) { |
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
603 SetProxyConfigs(enabled_by_user_, | 606 SetProxyConfigs(enabled_by_user_, |
604 IsDataReductionProxyAlternativeEnabled(), | 607 IsDataReductionProxyAlternativeEnabled(), |
605 restricted_by_carrier_, | 608 restricted_by_carrier_, |
606 false); | 609 false); |
607 } | 610 } |
608 disabled_on_vpn_ = false; | 611 disabled_on_vpn_ = false; |
609 return false; | 612 return false; |
610 } | 613 } |
611 | 614 |
612 } // namespace data_reduction_proxy | 615 } // namespace data_reduction_proxy |
OLD | NEW |