OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 CHROMEOS_NETWORK_DHCP_PROXY_SCRIPT_FETCHER_CHROMEOS_H_ | 5 #ifndef CHROMEOS_NETWORK_DHCP_PROXY_SCRIPT_FETCHER_CHROMEOS_H_ |
6 #define CHROMEOS_NETWORK_DHCP_PROXY_SCRIPT_FETCHER_CHROMEOS_H_ | 6 #define CHROMEOS_NETWORK_DHCP_PROXY_SCRIPT_FETCHER_CHROMEOS_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 : public net::DhcpProxyScriptFetcher { | 32 : public net::DhcpProxyScriptFetcher { |
33 public: | 33 public: |
34 explicit DhcpProxyScriptFetcherChromeos( | 34 explicit DhcpProxyScriptFetcherChromeos( |
35 net::URLRequestContext* url_request_context); | 35 net::URLRequestContext* url_request_context); |
36 ~DhcpProxyScriptFetcherChromeos() override; | 36 ~DhcpProxyScriptFetcherChromeos() override; |
37 | 37 |
38 // net::DhcpProxyScriptFetcher | 38 // net::DhcpProxyScriptFetcher |
39 int Fetch(base::string16* utf16_text, | 39 int Fetch(base::string16* utf16_text, |
40 const net::CompletionCallback& callback) override; | 40 const net::CompletionCallback& callback) override; |
41 void Cancel() override; | 41 void Cancel() override; |
| 42 void OnShutdown() override; |
42 const GURL& GetPacURL() const override; | 43 const GURL& GetPacURL() const override; |
43 std::string GetFetcherName() const override; | 44 std::string GetFetcherName() const override; |
44 | 45 |
45 private: | 46 private: |
46 void ContinueFetch(base::string16* utf16_text, | 47 void ContinueFetch(base::string16* utf16_text, |
47 net::CompletionCallback callback, | 48 net::CompletionCallback callback, |
48 std::string pac_url); | 49 std::string pac_url); |
49 | 50 |
50 net::URLRequestContext* url_request_context_; // Weak ptr | |
51 std::unique_ptr<net::ProxyScriptFetcher> proxy_script_fetcher_; | 51 std::unique_ptr<net::ProxyScriptFetcher> proxy_script_fetcher_; |
52 scoped_refptr<base::SingleThreadTaskRunner> network_handler_task_runner_; | 52 scoped_refptr<base::SingleThreadTaskRunner> network_handler_task_runner_; |
53 | 53 |
54 GURL pac_url_; | 54 GURL pac_url_; |
55 | 55 |
56 base::WeakPtrFactory<DhcpProxyScriptFetcherChromeos> weak_ptr_factory_; | 56 base::WeakPtrFactory<DhcpProxyScriptFetcherChromeos> weak_ptr_factory_; |
57 | 57 |
58 DISALLOW_COPY_AND_ASSIGN(DhcpProxyScriptFetcherChromeos); | 58 DISALLOW_COPY_AND_ASSIGN(DhcpProxyScriptFetcherChromeos); |
59 }; | 59 }; |
60 | 60 |
61 } // namespace chromeos | 61 } // namespace chromeos |
62 | 62 |
63 #endif // CHROMEOS_NETWORK_DHCP_PROXY_SCRIPT_FETCHER_CHROMEOS_H_ | 63 #endif // CHROMEOS_NETWORK_DHCP_PROXY_SCRIPT_FETCHER_CHROMEOS_H_ |
OLD | NEW |