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

Unified Diff: net/proxy/dhcp_proxy_script_fetcher_factory.cc

Issue 2929153002: Use URLRequestContextBuilderMojo to create the SystemURLRequestContext. (Closed)
Patch Set: Merge Created 3 years, 6 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: 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
}

Powered by Google App Engine
This is Rietveld 408576698