Index: net/proxy/dhcp_proxy_script_fetcher_factory.cc |
diff --git a/net/proxy/dhcp_proxy_script_fetcher_factory.cc b/net/proxy/dhcp_proxy_script_fetcher_factory.cc |
index 1ebe225b455384298fcae8a520bb07dbe7a58a32..1c673e515081536769014846a749bd6e3a86c5c9 100644 |
--- a/net/proxy/dhcp_proxy_script_fetcher_factory.cc |
+++ b/net/proxy/dhcp_proxy_script_fetcher_factory.cc |
@@ -14,42 +14,16 @@ |
namespace net { |
-DhcpProxyScriptFetcherFactory::DhcpProxyScriptFetcherFactory() |
- : feature_enabled_(false) { |
- set_enabled(true); |
-} |
+DhcpProxyScriptFetcherFactory::DhcpProxyScriptFetcherFactory() {} |
+ |
+DhcpProxyScriptFetcherFactory::~DhcpProxyScriptFetcherFactory() {} |
std::unique_ptr<DhcpProxyScriptFetcher> DhcpProxyScriptFetcherFactory::Create( |
URLRequestContext* context) { |
- if (!feature_enabled_) { |
- return base::MakeUnique<DoNothingDhcpProxyScriptFetcher>(); |
- } else { |
- DCHECK(IsSupported()); |
- std::unique_ptr<DhcpProxyScriptFetcher> ret; |
-#if defined(OS_WIN) |
- ret.reset(new DhcpProxyScriptFetcherWin(context)); |
-#endif |
- DCHECK(ret); |
- return ret; |
- } |
-} |
- |
-void DhcpProxyScriptFetcherFactory::set_enabled(bool enabled) { |
- if (IsSupported()) { |
- feature_enabled_ = enabled; |
- } |
-} |
- |
-bool DhcpProxyScriptFetcherFactory::enabled() const { |
- return feature_enabled_; |
-} |
- |
-// static |
-bool DhcpProxyScriptFetcherFactory::IsSupported() { |
Randy Smith (Not in Mondays)
2017/06/15 19:13:30
I won't say "Never has so many characters been exp
mmenke
2017/06/15 19:33:24
Acknowledged.
|
#if defined(OS_WIN) |
- return true; |
+ return base::MakeUnique<DhcpProxyScriptFetcherWin>(context); |
#else |
- return false; |
+ return base::MakeUnique<DoNothingDhcpProxyScriptFetcher>(); |
#endif |
} |