OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef NET_PROXY_DHCP_PROXY_SCRIPT_FETCHER_WIN_H_ | 5 #ifndef NET_PROXY_DHCP_PROXY_SCRIPT_FETCHER_WIN_H_ |
6 #define NET_PROXY_DHCP_PROXY_SCRIPT_FETCHER_WIN_H_ | 6 #define NET_PROXY_DHCP_PROXY_SCRIPT_FETCHER_WIN_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 21 matching lines...) Expand all Loading... |
32 NON_EXPORTED_BASE(public base::NonThreadSafe) { | 32 NON_EXPORTED_BASE(public base::NonThreadSafe) { |
33 public: | 33 public: |
34 // Creates a DhcpProxyScriptFetcherWin that issues requests through | 34 // Creates a DhcpProxyScriptFetcherWin that issues requests through |
35 // |url_request_context|. |url_request_context| must remain valid for | 35 // |url_request_context|. |url_request_context| must remain valid for |
36 // the lifetime of DhcpProxyScriptFetcherWin. | 36 // the lifetime of DhcpProxyScriptFetcherWin. |
37 explicit DhcpProxyScriptFetcherWin(URLRequestContext* url_request_context); | 37 explicit DhcpProxyScriptFetcherWin(URLRequestContext* url_request_context); |
38 virtual ~DhcpProxyScriptFetcherWin(); | 38 virtual ~DhcpProxyScriptFetcherWin(); |
39 | 39 |
40 // DhcpProxyScriptFetcher implementation. | 40 // DhcpProxyScriptFetcher implementation. |
41 int Fetch(base::string16* utf16_text, | 41 int Fetch(base::string16* utf16_text, |
42 const net::CompletionCallback& callback) OVERRIDE; | 42 const net::CompletionCallback& callback) override; |
43 void Cancel() OVERRIDE; | 43 void Cancel() override; |
44 const GURL& GetPacURL() const OVERRIDE; | 44 const GURL& GetPacURL() const override; |
45 std::string GetFetcherName() const OVERRIDE; | 45 std::string GetFetcherName() const override; |
46 | 46 |
47 // Sets |adapter_names| to contain the name of each network adapter on | 47 // Sets |adapter_names| to contain the name of each network adapter on |
48 // this machine that has DHCP enabled and is not a loop-back adapter. Returns | 48 // this machine that has DHCP enabled and is not a loop-back adapter. Returns |
49 // false on error. | 49 // false on error. |
50 static bool GetCandidateAdapterNames(std::set<std::string>* adapter_names); | 50 static bool GetCandidateAdapterNames(std::set<std::string>* adapter_names); |
51 | 51 |
52 protected: | 52 protected: |
53 int num_pending_fetchers() const; | 53 int num_pending_fetchers() const; |
54 | 54 |
55 URLRequestContext* url_request_context() const; | 55 URLRequestContext* url_request_context() const; |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 | 169 |
170 // Worker pool we use for all DHCP lookup tasks. | 170 // Worker pool we use for all DHCP lookup tasks. |
171 scoped_refptr<base::SequencedWorkerPool> worker_pool_; | 171 scoped_refptr<base::SequencedWorkerPool> worker_pool_; |
172 | 172 |
173 DISALLOW_IMPLICIT_CONSTRUCTORS(DhcpProxyScriptFetcherWin); | 173 DISALLOW_IMPLICIT_CONSTRUCTORS(DhcpProxyScriptFetcherWin); |
174 }; | 174 }; |
175 | 175 |
176 } // namespace net | 176 } // namespace net |
177 | 177 |
178 #endif // NET_PROXY_DHCP_PROXY_SCRIPT_FETCHER_WIN_H_ | 178 #endif // NET_PROXY_DHCP_PROXY_SCRIPT_FETCHER_WIN_H_ |
OLD | NEW |