| Index: components/data_reduction_proxy/core/browser/data_reduction_proxy_usage_stats.h
|
| diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_usage_stats.h b/components/data_reduction_proxy/core/browser/data_reduction_proxy_usage_stats.h
|
| index 5e159e7e66ac9f431c177a635b734b0cba5ca258..5e28567e4cd6c8299c7b59d72f46c9f2aafb0139 100644
|
| --- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_usage_stats.h
|
| +++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_usage_stats.h
|
| @@ -6,6 +6,7 @@
|
| #define COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_USAGE_STATS_H_
|
|
|
| #include "base/callback.h"
|
| +#include "base/memory/weak_ptr.h"
|
| #include "base/prefs/pref_member.h"
|
| #include "base/single_thread_task_runner.h"
|
| #include "base/threading/thread_checker.h"
|
| @@ -23,7 +24,7 @@ class ProxyServer;
|
|
|
| namespace data_reduction_proxy {
|
|
|
| -class DataReductionProxySettings;
|
| +class DataSaverService;
|
|
|
| // TODO(bengr): Rename as DataReductionProxyBypassStats.
|
| class DataReductionProxyUsageStats
|
| @@ -45,13 +46,12 @@ class DataReductionProxyUsageStats
|
| bool is_primary,
|
| const net::HttpResponseHeaders* headers);
|
|
|
| - // |params| outlives this class instance. |settings| provides a hook to inform
|
| + // |params| outlives this class instance. |service| provides a hook to inform
|
| // the user that the Data Reduction Proxy is unreachable, which occurs on the
|
| - // UI thread, hence the |ui_task_runner|. |settings| and |params| must not be
|
| - // null.
|
| + // UI thread, hence the |ui_task_runner|. |params| must not be null.
|
| DataReductionProxyUsageStats(
|
| DataReductionProxyParams* params,
|
| - DataReductionProxySettings* settings,
|
| + base::WeakPtr<DataSaverService> service,
|
| const scoped_refptr<base::SingleThreadTaskRunner>& ui_task_runner);
|
|
|
| ~DataReductionProxyUsageStats() override;
|
| @@ -137,7 +137,7 @@ class DataReductionProxyUsageStats
|
|
|
| DataReductionProxyParams* data_reduction_proxy_params_;
|
|
|
| - DataReductionProxySettings* settings_;
|
| + base::WeakPtr<DataSaverService> service_;
|
|
|
| // The last reason for bypass as determined by
|
| // MaybeBypassProxyAndPrepareToRetry
|
|
|