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

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

Issue 1153543016: Trigger LoFi based on NQE and use hysteresis to prevent frequent changes in network quality (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change in connection type triggers change in network quality despite hysteresis. Created 5 years, 6 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 | « no previous file | components/data_reduction_proxy/core/browser/data_reduction_proxy_config.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/data_reduction_proxy/core/browser/data_reduction_proxy_config.h
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_config.h b/components/data_reduction_proxy/core/browser/data_reduction_proxy_config.h
index 074f913a6f05e5a722021a6234113f3f99a9c940..b015f066cf8db7a1caf9b508ea1fbddcd8dcdc01 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_config.h
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_config.h
@@ -277,8 +277,7 @@ class DataReductionProxyConfig
TestMaybeDisableIfVPNTrialDisabled);
FRIEND_TEST_ALL_PREFIXES(DataReductionProxyConfigTest,
TestMaybeDisableIfVPNTrialEnabled);
- FRIEND_TEST_ALL_PREFIXES(DataReductionProxyConfigTest,
- PopulateAutoLoFiParams);
+ FRIEND_TEST_ALL_PREFIXES(DataReductionProxyConfigTest, AutoLoFiParams);
// NetworkChangeNotifier::IPAddressObserver:
void OnIPAddressChanged() override;
@@ -340,7 +339,7 @@ class DataReductionProxyConfig
// |network_quality_estimator| may be NULL.
// Virtualized for unit testing.
virtual bool IsNetworkQualityProhibitivelySlow(
- const net::NetworkQualityEstimator* network_quality_estimator) const;
+ const net::NetworkQualityEstimator* network_quality_estimator);
// Returns true only if Lo-Fi "q=low" header should be added to the Chrome
// Proxy header based on the value of |lofi_status|.
@@ -389,6 +388,17 @@ class DataReductionProxyConfig
// duration shorter than |auto_lofi_hysteresis_|.
base::TimeDelta auto_lofi_hysteresis_;
+ // Time when the network quality was last updated.
+ base::TimeTicks network_quality_last_updated_;
+
+ // True iff the network was determined to be prohibitively slow when the
+ // network quality was last updated (most recent main frame request).
+ bool network_prohibitively_slow_;
+
+ // Set to the connection type reported by NetworkChangeNotifier when the
+ // network quality was last updated (most recent main frame request).
+ net::NetworkChangeNotifier::ConnectionType connection_type_;
+
// Current Lo-Fi status.
// The value changes only on main frame load.
LoFiStatus lofi_status_;
« no previous file with comments | « no previous file | components/data_reduction_proxy/core/browser/data_reduction_proxy_config.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698