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

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

Issue 2687193006: DRP: Do not fetch warm up URL on offline connections (Closed)
Patch Set: ryansturm comments 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 fe9eb76bbf47e72fd7ec509382c708cc0a93e4d7..c768ea3bb9ff6a68334c8688c0c9ca7ce014a928 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
@@ -87,7 +87,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
@@ -255,6 +256,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.
@@ -377,10 +380,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