| 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_SCRIPT_FETCHER_FACTORY_H_ | 5 #ifndef NET_PROXY_DHCP_SCRIPT_FETCHER_FACTORY_H_ |
| 6 #define NET_PROXY_DHCP_SCRIPT_FETCHER_FACTORY_H_ | 6 #define NET_PROXY_DHCP_SCRIPT_FETCHER_FACTORY_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/memory/singleton.h" | 10 #include "base/memory/singleton.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 // | 40 // |
| 41 // Note that while a request is in progress, the fetcher may be holding a | 41 // Note that while a request is in progress, the fetcher may be holding a |
| 42 // reference to |url_request_context|. Be careful not to create cycles | 42 // reference to |url_request_context|. Be careful not to create cycles |
| 43 // between the fetcher and the context; you can break such cycles by calling | 43 // between the fetcher and the context; you can break such cycles by calling |
| 44 // Cancel(). | 44 // Cancel(). |
| 45 DhcpProxyScriptFetcher* Create(URLRequestContext* url_request_context); | 45 DhcpProxyScriptFetcher* Create(URLRequestContext* url_request_context); |
| 46 | 46 |
| 47 // Attempts to enable/disable the DHCP WPAD feature. Does nothing | 47 // Attempts to enable/disable the DHCP WPAD feature. Does nothing |
| 48 // if |IsSupported()| returns false. | 48 // if |IsSupported()| returns false. |
| 49 // | 49 // |
| 50 // The default is |enabled() == true|. | 50 // The current default is |enabled() == false|. |
| 51 void set_enabled(bool enabled); | 51 void set_enabled(bool enabled); |
| 52 | 52 |
| 53 // Returns true if the DHCP WPAD feature is enabled. Always returns | 53 // Returns true if the DHCP WPAD feature is enabled. Always returns |
| 54 // false if |IsSupported()| is false. | 54 // false if |IsSupported()| is false. |
| 55 bool enabled() const; | 55 bool enabled() const; |
| 56 | 56 |
| 57 // Returns true if the DHCP WPAD feature is supported on the current | 57 // Returns true if the DHCP WPAD feature is supported on the current |
| 58 // operating system. | 58 // operating system. |
| 59 static bool IsSupported(); | 59 static bool IsSupported(); |
| 60 | 60 |
| 61 private: | 61 private: |
| 62 bool feature_enabled_; | 62 bool feature_enabled_; |
| 63 | 63 |
| 64 DISALLOW_COPY_AND_ASSIGN(DhcpProxyScriptFetcherFactory); | 64 DISALLOW_COPY_AND_ASSIGN(DhcpProxyScriptFetcherFactory); |
| 65 }; | 65 }; |
| 66 | 66 |
| 67 } // namespace net | 67 } // namespace net |
| 68 | 68 |
| 69 #endif // NET_PROXY_DHCP_SCRIPT_FETCHER_FACTORY_H_ | 69 #endif // NET_PROXY_DHCP_SCRIPT_FETCHER_FACTORY_H_ |
| OLD | NEW |