| 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_;
|
|
|