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

Unified Diff: components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.cc

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_settings.cc
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.cc
index 57f18bb647abfbfdaed710e8e3ebcc3905623f86..0c5b802b5dc54c118d46143b7be308d274ab9bb8 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.cc
@@ -13,6 +13,7 @@
#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_config.h"
#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.h"
#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_service.h"
+#include "components/data_reduction_proxy/core/common/data_reduction_proxy_params.h"
#include "components/data_reduction_proxy/core/common/data_reduction_proxy_pref_names.h"
#include "components/data_reduction_proxy/core/common/data_reduction_proxy_switches.h"
@@ -21,13 +22,6 @@ namespace {
const char kUMAProxyStartupStateHistogram[] =
"DataReductionProxy.StartupState";
-bool IsEnabledOnCommandLine() {
- const base::CommandLine& command_line =
- *base::CommandLine::ForCurrentProcess();
- return command_line.HasSwitch(
- data_reduction_proxy::switches::kEnableDataReductionProxy);
-}
-
bool IsLoFiEnabledOnCommandLine() {
const base::CommandLine& command_line =
*base::CommandLine::ForCurrentProcess();
@@ -116,7 +110,8 @@ void DataReductionProxySettings::SetCallbackToRegisterSyntheticFieldTrial(
}
bool DataReductionProxySettings::IsDataReductionProxyEnabled() const {
- return spdy_proxy_auth_enabled_.GetValue() || IsEnabledOnCommandLine();
+ return spdy_proxy_auth_enabled_.GetValue() ||
+ DataReductionProxyParams::ShouldForceEnableDataReductionProxy();
}
bool DataReductionProxySettings::CanUseDataReductionProxy(

Powered by Google App Engine
This is Rietveld 408576698