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

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

Issue 2700203002: DRP: Do not fetch warm up URL on offline connections (Closed)
Patch Set: Created 3 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 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 6cad47d23c10ca7c59e885cb6b1383bfb831abec..14003b24e07d46c27162317105bf01bde7a8e132 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
@@ -86,7 +86,8 @@ enum SecureProxyCheckFetchResult {
// This object lives on the IO thread and all of its methods are expected to be
// called from there.
class DataReductionProxyConfig
- : public net::NetworkChangeNotifier::IPAddressObserver {
+ : public net::NetworkChangeNotifier::IPAddressObserver,
+ public net::NetworkChangeNotifier::ConnectionTypeObserver {
public:
// The caller must ensure that all parameters remain alive for the lifetime
// of the |DataReductionProxyConfig| instance, with the exception of
@@ -250,6 +251,8 @@ class DataReductionProxyConfig
// NetworkChangeNotifier::IPAddressObserver:
void OnIPAddressChanged() override;
+ void OnConnectionTypeChanged(
+ net::NetworkChangeNotifier::ConnectionType type) override;
// Populates the parameters for the Lo-Fi field trial if the session is part
// of either Lo-Fi enabled or Lo-Fi control field trial group.
@@ -372,10 +375,14 @@ class DataReductionProxyConfig
// than |auto_lofi_hysteresis_|.
bool network_prohibitively_slow_;
- // Set to the connection type reported by NetworkChangeNotifier when the
- // network quality was last checked.
+ // The current connection type.
net::NetworkChangeNotifier::ConnectionType connection_type_;
+ // True if the connection type changed since the last call to
+ // IsNetworkQualityProhibitivelySlow(). This call happens only on main frame
+ // requests.
+ bool connection_type_changed_;
+
// If true, Lo-Fi is turned off for the rest of the session. This is set to
// true if Lo-Fi is disabled via flags or if the user implicitly opts out.
bool lofi_off_;
« 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