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

Side by Side Diff: net/proxy/dhcp_proxy_script_fetcher_factory.cc

Issue 1545233002: Convert Pass()→std::move() in //net (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/proxy/dhcp_proxy_script_fetcher_factory.h" 5 #include "net/proxy/dhcp_proxy_script_fetcher_factory.h"
6 6
7 #include "net/base/net_errors.h" 7 #include "net/base/net_errors.h"
8 #include "net/proxy/dhcp_proxy_script_fetcher.h" 8 #include "net/proxy/dhcp_proxy_script_fetcher.h"
9 9
10 #if defined(OS_WIN) 10 #if defined(OS_WIN)
(...skipping 11 matching lines...) Expand all
22 URLRequestContext* context) { 22 URLRequestContext* context) {
23 if (!feature_enabled_) { 23 if (!feature_enabled_) {
24 return make_scoped_ptr(new DoNothingDhcpProxyScriptFetcher()); 24 return make_scoped_ptr(new DoNothingDhcpProxyScriptFetcher());
25 } else { 25 } else {
26 DCHECK(IsSupported()); 26 DCHECK(IsSupported());
27 scoped_ptr<DhcpProxyScriptFetcher> ret; 27 scoped_ptr<DhcpProxyScriptFetcher> ret;
28 #if defined(OS_WIN) 28 #if defined(OS_WIN)
29 ret.reset(new DhcpProxyScriptFetcherWin(context)); 29 ret.reset(new DhcpProxyScriptFetcherWin(context));
30 #endif 30 #endif
31 DCHECK(ret); 31 DCHECK(ret);
32 return ret.Pass(); 32 return ret;
33 } 33 }
34 } 34 }
35 35
36 void DhcpProxyScriptFetcherFactory::set_enabled(bool enabled) { 36 void DhcpProxyScriptFetcherFactory::set_enabled(bool enabled) {
37 if (IsSupported()) { 37 if (IsSupported()) {
38 feature_enabled_ = enabled; 38 feature_enabled_ = enabled;
39 } 39 }
40 } 40 }
41 41
42 bool DhcpProxyScriptFetcherFactory::enabled() const { 42 bool DhcpProxyScriptFetcherFactory::enabled() const {
43 return feature_enabled_; 43 return feature_enabled_;
44 } 44 }
45 45
46 // static 46 // static
47 bool DhcpProxyScriptFetcherFactory::IsSupported() { 47 bool DhcpProxyScriptFetcherFactory::IsSupported() {
48 #if defined(OS_WIN) 48 #if defined(OS_WIN)
49 return true; 49 return true;
50 #else 50 #else
51 return false; 51 return false;
52 #endif 52 #endif
53 } 53 }
54 54
55 } // namespace net 55 } // namespace net
OLDNEW
« no previous file with comments | « net/log/write_to_file_net_log_observer_unittest.cc ('k') | net/proxy/in_process_mojo_proxy_resolver_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698