Index: components/data_reduction_proxy/browser/data_reduction_proxy_params.cc |
diff --git a/components/data_reduction_proxy/browser/data_reduction_proxy_params.cc b/components/data_reduction_proxy/browser/data_reduction_proxy_params.cc |
index ce691574c8ba001c03b48c4cbb7293306586e4f3..6096ce77d5b5f46f6d946aebe208f5a96bdf1f66 100644 |
--- a/components/data_reduction_proxy/browser/data_reduction_proxy_params.cc |
+++ b/components/data_reduction_proxy/browser/data_reduction_proxy_params.cc |
@@ -42,18 +42,12 @@ bool DataReductionProxyParams::IsIncludedInPreconnectHintingFieldTrial() { |
"DataCompressionProxyPreconnectHints") == kEnabled; |
} |
-// static |
-bool DataReductionProxyParams::IsKeySetOnCommandLine() { |
- const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
- return command_line.HasSwitch( |
- data_reduction_proxy::switches::kEnableDataReductionProxy); |
-} |
- |
DataReductionProxyParams::DataReductionProxyParams(int flags) |
: allowed_((flags & kAllowed) == kAllowed), |
fallback_allowed_((flags & kFallbackAllowed) == kFallbackAllowed), |
alt_allowed_((flags & kAlternativeAllowed) == kAlternativeAllowed), |
- promo_allowed_((flags & kPromoAllowed) == kPromoAllowed) { |
+ promo_allowed_((flags & kPromoAllowed) == kPromoAllowed), |
+ configured_on_command_line_(false) { |
bool result = Init(allowed_, fallback_allowed_, alt_allowed_); |
DCHECK(result); |
} |
@@ -82,7 +76,8 @@ DataReductionProxyParams::DataReductionProxyParams(int flags, |
: allowed_((flags & kAllowed) == kAllowed), |
fallback_allowed_((flags & kFallbackAllowed) == kFallbackAllowed), |
alt_allowed_((flags & kAlternativeAllowed) == kAlternativeAllowed), |
- promo_allowed_((flags & kPromoAllowed) == kPromoAllowed) { |
+ promo_allowed_((flags & kPromoAllowed) == kPromoAllowed), |
+ configured_on_command_line_(false) { |
if (should_call_init) { |
bool result = Init(allowed_, fallback_allowed_, alt_allowed_); |
DCHECK(result); |
@@ -169,27 +164,21 @@ void DataReductionProxyParams::InitWithoutChecks() { |
command_line.GetSwitchValueASCII(switches::kDataReductionProxyAlt); |
std::string alt_fallback_origin = command_line.GetSwitchValueASCII( |
switches::kDataReductionProxyAltFallback); |
- key_ = command_line.GetSwitchValueASCII(switches::kDataReductionProxyKey); |
- bool configured_on_command_line = |
+ configured_on_command_line_ = |
!(origin.empty() && fallback_origin.empty() && ssl_origin.empty() && |
alt_origin.empty() && alt_fallback_origin.empty()); |
// Configuring the proxy on the command line overrides the values of |
// |allowed_| and |alt_allowed_|. |
- if (configured_on_command_line) |
+ if (configured_on_command_line_) |
allowed_ = true; |
if (!(ssl_origin.empty() && |
alt_origin.empty() && |
alt_fallback_origin.empty())) |
alt_allowed_ = true; |
- // Only use default key if non of the proxies are configured on the command |
- // line. |
- if (key_.empty() && !configured_on_command_line) |
- key_ = GetDefaultKey(); |
- |
std::string probe_url = command_line.GetSwitchValueASCII( |
switches::kDataReductionProxyProbeURL); |
std::string warmup_url = command_line.GetSwitchValueASCII( |
@@ -277,13 +266,6 @@ bool DataReductionProxyParams::IsDataReductionProxy( |
return false; |
} |
-std::string DataReductionProxyParams::GetDefaultKey() const { |
-#if defined(SPDY_PROXY_AUTH_VALUE) |
- return SPDY_PROXY_AUTH_VALUE; |
-#endif |
- return std::string(); |
-} |
- |
std::string DataReductionProxyParams::GetDefaultDevOrigin() const { |
#if defined(DATA_REDUCTION_DEV_HOST) |
const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |