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

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

Issue 1933653004: Reset the Lo-Fi main frame state when there is a new main frame request (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: check data_reduction_proxy_io_data_ Created 4 years, 7 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
Index: components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.cc
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.cc
index 438b731acad8c1d42935e3ee0eab7147d84ce379..425a3a3b94071e35817bce36a7479a6da963787e 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.cc
@@ -115,7 +115,6 @@ void DataReductionProxySettings::SetCallbackToRegisterSyntheticFieldTrial(
on_data_reduction_proxy_enabled) {
register_synthetic_field_trial_ = on_data_reduction_proxy_enabled;
RegisterDataReductionProxyFieldTrial();
- RegisterLoFiFieldTrial();
}
bool DataReductionProxySettings::IsDataReductionProxyEnabled() const {
@@ -172,9 +171,6 @@ void DataReductionProxySettings::SetLoFiModeActiveOnMainFrame(
prefs_->SetBoolean(prefs::kLoFiWasUsedThisSession, true);
lo_fi_load_image_requested_ = false;
lo_fi_mode_active_ = lo_fi_mode_active;
- if (!register_synthetic_field_trial_.is_null()) {
- RegisterLoFiFieldTrial();
- }
}
bool DataReductionProxySettings::WasLoFiModeActiveOnMainFrame() const {
@@ -221,19 +217,10 @@ void DataReductionProxySettings::RegisterDataReductionProxyFieldTrial() {
IsDataReductionProxyEnabled() ? "Enabled" : "Disabled");
}
-void DataReductionProxySettings::RegisterLoFiFieldTrial() {
- register_synthetic_field_trial_.Run(
- "SyntheticDataReductionProxyLoFiSetting",
- IsDataReductionProxyEnabled() && WasLoFiModeActiveOnMainFrame()
- ? "Enabled"
- : "Disabled");
-}
-
void DataReductionProxySettings::OnProxyEnabledPrefChange() {
DCHECK(thread_checker_.CalledOnValidThread());
if (!register_synthetic_field_trial_.is_null()) {
RegisterDataReductionProxyFieldTrial();
- RegisterLoFiFieldTrial();
}
if (!allowed_)
return;

Powered by Google App Engine
This is Rietveld 408576698