Chromium Code Reviews| Index: chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_factory.cc |
| diff --git a/chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_factory.cc b/chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_factory.cc |
| index cf8ed375a02d29f3c6bdedb9d4ec71275d10865f..4bc8197734901c4ba368f3e85cdbbd7ccccd136d 100644 |
| --- a/chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_factory.cc |
| +++ b/chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_factory.cc |
| @@ -7,7 +7,6 @@ |
| #include "base/bind.h" |
| #include "base/memory/singleton.h" |
| #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h" |
| -#include "chrome/browser/profiles/profile.h" |
| #include "components/data_reduction_proxy/browser/data_reduction_proxy_params.h" |
| #include "components/data_reduction_proxy/browser/data_reduction_proxy_usage_stats.h" |
| #include "components/keyed_service/content/browser_context_dependency_manager.h" |
| @@ -53,10 +52,11 @@ DataReductionProxyChromeSettingsFactory:: |
| KeyedService* DataReductionProxyChromeSettingsFactory::BuildServiceInstanceFor( |
| content::BrowserContext* context) const { |
| - Profile* profile = static_cast<Profile*>(context); |
| - int flags = DataReductionProxyParams::kFallbackAllowed; |
| - if (DataReductionProxyParams::IsIncludedInFieldTrial()) |
| - flags |= DataReductionProxyParams::kAllowed; |
| + int flags = 0; |
| + if (DataReductionProxyParams::IsIncludedInFieldTrial()) { |
| + flags |= (DataReductionProxyParams::kAllowed | |
| + DataReductionProxyParams::kFallbackAllowed); |
| + } |
| if (DataReductionProxyParams::IsIncludedInAlternativeFieldTrial()) |
| flags |= DataReductionProxyParams::kAlternativeAllowed; |
| if (DataReductionProxyParams::IsIncludedInPromoFieldTrial()) |
| @@ -64,11 +64,7 @@ KeyedService* DataReductionProxyChromeSettingsFactory::BuildServiceInstanceFor( |
| if (DataReductionProxyParams::IsIncludedInHoldbackFieldTrial()) |
| flags |= DataReductionProxyParams::kHoldback; |
| - DataReductionProxyParams* params = new DataReductionProxyParams(flags); |
| - |
| // Takes ownership of params. |
|
marq (ping after 24h)
2014/07/31 23:54:32
Comment doesn't really make sense now.
bengr
2014/08/02 01:10:31
Done.
|
| - DataReductionProxyChromeSettings* settings = |
| - new DataReductionProxyChromeSettings(params); |
| - settings->InitDataReductionProxySettings(profile); |
| - return settings; |
| + return new DataReductionProxyChromeSettings( |
| + new DataReductionProxyParams(flags)); |
| } |