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

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

Issue 1140443002: Modify IPC call to properly record the PLT histograms for LoFi. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change the variable names to be more intuitive. Created 5 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_config.cc
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_config.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_config.cc
index 20154b7923b5a34f6df2f23adde6aaa825af9f3f..2f57e280615a4f6758e3463acc5d68b872a4e3f9 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_config.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_config.cc
@@ -229,6 +229,36 @@ bool DataReductionProxyConfig::AreProxiesBypassed(
return bypassed;
}
+bool DataReductionProxyConfig::IsNetworkBad() const {
+ // TODO(tbansal): This must return the network quality based on
+ // network quality estimated by NQE.
+ DCHECK(thread_checker_.CalledOnValidThread());
+ return false;
+}
+
+bool DataReductionProxyConfig::IsIncludedInLoFiEnabledFieldTrial() const {
+ // TODO(tbansal): This must return if the current session is in the LoFi
+ // enabled finch group.
+ DCHECK(thread_checker_.CalledOnValidThread());
+ return false;
+}
+
+bool DataReductionProxyConfig::IsIncludedInLoFiControlFieldTrial() const {
+ // TODO(tbansal): This must return if the current session is in the LoFi
+ // control finch group.
+ DCHECK(thread_checker_.CalledOnValidThread());
+ return false;
+}
+
+AutoLoFiStatus DataReductionProxyConfig::GetAutoLoFiStatus() const {
+ DCHECK(thread_checker_.CalledOnValidThread());
+ if (IsIncludedInLoFiControlFieldTrial() && IsNetworkBad())
+ return AUTO_LOFI_STATUS_OFF;
+ if (IsIncludedInLoFiEnabledFieldTrial() && IsNetworkBad())
+ return AUTO_LOFI_STATUS_ON;
+ return AUTO_LOFI_STATUS_DISABLED;
+}
+
bool DataReductionProxyConfig::IsProxyBypassed(
const net::ProxyRetryInfoMap& retry_map,
const net::ProxyServer& proxy_server,

Powered by Google App Engine
This is Rietveld 408576698