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

Unified Diff: components/data_reduction_proxy/browser/data_reduction_proxy_settings.cc

Issue 586333003: Disable fallback support for alternative data reduction proxy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/data_reduction_proxy/browser/data_reduction_proxy_params_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/data_reduction_proxy/browser/data_reduction_proxy_settings.cc
diff --git a/components/data_reduction_proxy/browser/data_reduction_proxy_settings.cc b/components/data_reduction_proxy/browser/data_reduction_proxy_settings.cc
index 4a01aa5604e57599fdd619114e3f76bb51e1285e..07d920cacbb6c864ab86c4d9ef1b92874b07cc5a 100644
--- a/components/data_reduction_proxy/browser/data_reduction_proxy_settings.cc
+++ b/components/data_reduction_proxy/browser/data_reduction_proxy_settings.cc
@@ -339,6 +339,10 @@ void DataReductionProxySettings::OnIPAddressChanged() {
RecordNetworkChangeEvent(IP_CHANGED);
if (DisableIfVPN())
return;
+ if (IsDataReductionProxyAlternativeEnabled() &&
+ !params_->alternative_fallback_allowed()) {
+ return;
+ }
ProbeWhetherDataReductionProxyIsAvailable();
}
}
@@ -393,7 +397,9 @@ void DataReductionProxySettings::MaybeActivateDataReductionProxy(
at_startup);
// Check if the proxy has been restricted explicitly by the carrier.
- if (enabled_by_user_ && !disabled_on_vpn_) {
+ if (enabled_by_user_ && !disabled_on_vpn_ &&
+ !(IsDataReductionProxyAlternativeEnabled() &&
+ !params_->alternative_fallback_allowed())) {
ProbeWhetherDataReductionProxyIsAvailable();
}
}
@@ -411,9 +417,9 @@ void DataReductionProxySettings::SetProxyConfigs(bool enabled,
if (enabled & !params_->holdback()) {
if (alternative_enabled) {
configurator_->Enable(restricted,
- !params_->fallback_allowed(),
+ !params_->alternative_fallback_allowed(),
params_->alt_origin().spec(),
- params_->alt_fallback_origin().spec(),
+ std::string(),
params_->ssl_origin().spec());
} else {
configurator_->Enable(restricted,
« no previous file with comments | « components/data_reduction_proxy/browser/data_reduction_proxy_params_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698