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

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

Issue 1057473003: Remove BooleanPrefMember usage from Data Reduction Proxy IO classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: bengr CR comments Created 5 years, 8 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_io_data.h
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.h b/components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.h
index 9a6f3b847f16d7cc098aa58f6acab12b01c57c70..4acbc480302a7675842ca2b8435a5be48352f620 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.h
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.h
@@ -9,7 +9,7 @@
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
-#include "base/prefs/pref_member.h"
+#include "base/single_thread_task_runner.h"
#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_debug_ui_service.h"
#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_delegate.h"
#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_metrics.h"
@@ -42,23 +42,21 @@ class DataReductionProxyIOData : public DataReductionProxyEventStorageDelegate {
public:
// Constructs a DataReductionProxyIOData object. |param_flags| is used to
// set information about the DNS names used by the proxy, and allowable
- // configurations.
+ // configurations. |enabled| sets the initial state of the Data Reduction
+ // Proxy.
DataReductionProxyIOData(
const Client& client,
int param_flags,
net::NetLog* net_log,
scoped_refptr<base::SingleThreadTaskRunner> io_task_runner,
scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner,
+ bool enabled,
bool enable_quic,
const std::string& user_agent);
virtual ~DataReductionProxyIOData();
- // Initializes preferences, including a preference to track whether the
- // Data Reduction Proxy is enabled.
- void InitOnUIThread(PrefService* pref_service);
-
- // Destroys the statistics preferences.
+ // Performs UI thread specific shutdown logic.
void ShutdownOnUIThread();
// Sets the Data Reduction Proxy service after it has been created.
@@ -205,12 +203,9 @@ class DataReductionProxyIOData : public DataReductionProxyEventStorageDelegate {
scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_;
scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner_;
- // Used
- bool shutdown_on_ui_;
-
- // Preference that determines if the Data Reduction Proxy has been enabled
- // by the user. In practice, this can be overridden by the command line.
- BooleanPrefMember enabled_;
+ // Whether the Data Reduction Proxy has been enabled or not by the user. In
+ // practice, this can be overridden by the command line.
+ bool enabled_;
// The net::URLRequestContextGetter used for making URL requests.
net::URLRequestContextGetter* url_request_context_getter_;

Powered by Google App Engine
This is Rietveld 408576698