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

Side by Side Diff: components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.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: Added comment 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
OLDNEW
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
123 base::Bind( 123 base::Bind(
124 &DataReductionProxySettings::OnProxyAlternativeEnabledPrefChange, 124 &DataReductionProxySettings::OnProxyAlternativeEnabledPrefChange,
125 base::Unretained(this))); 125 base::Unretained(this)));
126 } 126 }
127 127
128 void DataReductionProxySettings::InitDataReductionProxySettings( 128 void DataReductionProxySettings::InitDataReductionProxySettings(
129 PrefService* prefs, 129 PrefService* prefs,
130 scoped_ptr<DataReductionProxyStatisticsPrefs> statistics_prefs, 130 scoped_ptr<DataReductionProxyStatisticsPrefs> statistics_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 enable_quic) {
134 DCHECK(thread_checker_.CalledOnValidThread()); 135 DCHECK(thread_checker_.CalledOnValidThread());
135 DCHECK(prefs); 136 DCHECK(prefs);
136 DCHECK(!statistics_prefs_); 137 DCHECK(!statistics_prefs_);
137 DCHECK(url_request_context_getter); 138 DCHECK(url_request_context_getter);
138 DCHECK(event_store); 139 DCHECK(event_store);
139 prefs_ = prefs; 140 prefs_ = prefs;
140 statistics_prefs_ = statistics_prefs.Pass(); 141 statistics_prefs_ = statistics_prefs.Pass();
141 url_request_context_getter_ = url_request_context_getter; 142 url_request_context_getter_ = url_request_context_getter;
142 net_log_ = net_log; 143 net_log_ = net_log;
143 event_store_ = event_store; 144 event_store_ = event_store;
144 InitPrefMembers(); 145 InitPrefMembers();
145 RecordDataReductionInit(); 146 RecordDataReductionInit();
146 147
147 // Disable the proxy if it is not allowed to be used. 148 // Disable the proxy if it is not allowed to be used.
148 if (!params()->allowed()) 149 if (!params()->allowed())
149 return; 150 return;
150 151
152 params()->EnableQuic(enable_quic);
153
151 AddDefaultProxyBypassRules(); 154 AddDefaultProxyBypassRules();
152 net::NetworkChangeNotifier::AddIPAddressObserver(this); 155 net::NetworkChangeNotifier::AddIPAddressObserver(this);
153 } 156 }
154 157
155 void DataReductionProxySettings::SetDataReductionProxyStatisticsPrefs( 158 void DataReductionProxySettings::SetDataReductionProxyStatisticsPrefs(
156 scoped_ptr<DataReductionProxyStatisticsPrefs> statistics_prefs) { 159 scoped_ptr<DataReductionProxyStatisticsPrefs> statistics_prefs) {
157 statistics_prefs_ = statistics_prefs.Pass(); 160 statistics_prefs_ = statistics_prefs.Pass();
158 } 161 }
159 162
160 void DataReductionProxySettings::EnableCompressionStatisticsLogging( 163 void DataReductionProxySettings::EnableCompressionStatisticsLogging(
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after
622 SetProxyConfigs(enabled_by_user_, 625 SetProxyConfigs(enabled_by_user_,
623 IsDataReductionProxyAlternativeEnabled(), 626 IsDataReductionProxyAlternativeEnabled(),
624 restricted_by_carrier_, 627 restricted_by_carrier_,
625 false); 628 false);
626 } 629 }
627 disabled_on_vpn_ = false; 630 disabled_on_vpn_ = false;
628 return false; 631 return false;
629 } 632 }
630 633
631 } // namespace data_reduction_proxy 634 } // namespace data_reduction_proxy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698