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

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

Issue 893003002: Data Reduction Proxy class ownership updates and Settings cleanup (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sgurun CR comments Created 5 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
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..8636d693c9853b729df9c4d7c5c2bbeec21f1e96 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 DataReductionProxyService;
// 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<DataReductionProxyService> 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<DataReductionProxyService> service_;
// The last reason for bypass as determined by
// MaybeBypassProxyAndPrepareToRetry

Powered by Google App Engine
This is Rietveld 408576698