| OLD | NEW |
| 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 #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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| 11 | 11 |
| 12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 13 #include "base/memory/scoped_vector.h" | 13 #include "base/memory/scoped_vector.h" |
| 14 #include "base/threading/non_thread_safe.h" | 14 #include "base/threading/non_thread_safe.h" |
| 15 #include "base/timer.h" | 15 #include "base/timer.h" |
| 16 #include "net/proxy/dhcp_proxy_script_fetcher.h" | 16 #include "net/proxy/dhcp_proxy_script_fetcher.h" |
| 17 | 17 |
| 18 namespace net { | 18 namespace net { |
| 19 | 19 |
| 20 class DhcpProxyScriptAdapterFetcher; | 20 class DhcpProxyScriptAdapterFetcher; |
| 21 class URLRequestContext; | 21 class URLRequestContext; |
| 22 | 22 |
| 23 // Windows-specific implementation. | 23 // Windows-specific implementation. |
| 24 class DhcpProxyScriptFetcherWin | 24 class NET_TEST DhcpProxyScriptFetcherWin |
| 25 : public DhcpProxyScriptFetcher, | 25 : public DhcpProxyScriptFetcher, |
| 26 public base::NonThreadSafe { | 26 NON_EXPORTED_BASE(public base::NonThreadSafe) { |
| 27 public: | 27 public: |
| 28 // Creates a DhcpProxyScriptFetcherWin that issues requests through | 28 // Creates a DhcpProxyScriptFetcherWin that issues requests through |
| 29 // |url_request_context|. |url_request_context| must remain valid for | 29 // |url_request_context|. |url_request_context| must remain valid for |
| 30 // the lifetime of DhcpProxyScriptFetcherWin. | 30 // the lifetime of DhcpProxyScriptFetcherWin. |
| 31 explicit DhcpProxyScriptFetcherWin(URLRequestContext* url_request_context); | 31 explicit DhcpProxyScriptFetcherWin(URLRequestContext* url_request_context); |
| 32 virtual ~DhcpProxyScriptFetcherWin(); | 32 virtual ~DhcpProxyScriptFetcherWin(); |
| 33 | 33 |
| 34 // DhcpProxyScriptFetcher implementation. | 34 // DhcpProxyScriptFetcher implementation. |
| 35 int Fetch(string16* utf16_text, CompletionCallback* callback) OVERRIDE; | 35 int Fetch(string16* utf16_text, CompletionCallback* callback) OVERRIDE; |
| 36 void Cancel() OVERRIDE; | 36 void Cancel() OVERRIDE; |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 base::OneShotTimer<DhcpProxyScriptFetcherWin> wait_timer_; | 114 base::OneShotTimer<DhcpProxyScriptFetcherWin> wait_timer_; |
| 115 | 115 |
| 116 scoped_refptr<URLRequestContext> url_request_context_; | 116 scoped_refptr<URLRequestContext> url_request_context_; |
| 117 | 117 |
| 118 DISALLOW_IMPLICIT_CONSTRUCTORS(DhcpProxyScriptFetcherWin); | 118 DISALLOW_IMPLICIT_CONSTRUCTORS(DhcpProxyScriptFetcherWin); |
| 119 }; | 119 }; |
| 120 | 120 |
| 121 } // namespace net | 121 } // namespace net |
| 122 | 122 |
| 123 #endif // NET_PROXY_DHCP_PROXY_SCRIPT_FETCHER_WIN_H_ | 123 #endif // NET_PROXY_DHCP_PROXY_SCRIPT_FETCHER_WIN_H_ |
| OLD | NEW |