| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 CHROME_BROWSER_NET_PROXY_POLICY_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_NET_PROXY_POLICY_HANDLER_H_ |
| 6 #define CHROME_BROWSER_NET_PROXY_POLICY_HANDLER_H_ | 6 #define CHROME_BROWSER_NET_PROXY_POLICY_HANDLER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 PROXY_USE_SYSTEM_PROXY_SERVER_MODE = 3, | 34 PROXY_USE_SYSTEM_PROXY_SERVER_MODE = 3, |
| 35 | 35 |
| 36 MODE_COUNT | 36 MODE_COUNT |
| 37 }; | 37 }; |
| 38 | 38 |
| 39 ProxyPolicyHandler(); | 39 ProxyPolicyHandler(); |
| 40 virtual ~ProxyPolicyHandler(); | 40 virtual ~ProxyPolicyHandler(); |
| 41 | 41 |
| 42 // ConfigurationPolicyHandler methods: | 42 // ConfigurationPolicyHandler methods: |
| 43 virtual bool CheckPolicySettings(const PolicyMap& policies, | 43 virtual bool CheckPolicySettings(const PolicyMap& policies, |
| 44 PolicyErrorMap* errors) OVERRIDE; | 44 PolicyErrorMap* errors) override; |
| 45 virtual void ApplyPolicySettings(const PolicyMap& policies, | 45 virtual void ApplyPolicySettings(const PolicyMap& policies, |
| 46 PrefValueMap* prefs) OVERRIDE; | 46 PrefValueMap* prefs) override; |
| 47 | 47 |
| 48 private: | 48 private: |
| 49 const base::Value* GetProxyPolicyValue(const PolicyMap& policies, | 49 const base::Value* GetProxyPolicyValue(const PolicyMap& policies, |
| 50 const char* policy_name); | 50 const char* policy_name); |
| 51 | 51 |
| 52 // Converts the deprecated ProxyServerMode policy value to a ProxyMode value | 52 // Converts the deprecated ProxyServerMode policy value to a ProxyMode value |
| 53 // and places the result in |mode_value|. Returns whether the conversion | 53 // and places the result in |mode_value|. Returns whether the conversion |
| 54 // succeeded. | 54 // succeeded. |
| 55 bool CheckProxyModeAndServerMode(const PolicyMap& policies, | 55 bool CheckProxyModeAndServerMode(const PolicyMap& policies, |
| 56 PolicyErrorMap* errors, | 56 PolicyErrorMap* errors, |
| 57 std::string* mode_value); | 57 std::string* mode_value); |
| 58 | 58 |
| 59 DISALLOW_COPY_AND_ASSIGN(ProxyPolicyHandler); | 59 DISALLOW_COPY_AND_ASSIGN(ProxyPolicyHandler); |
| 60 }; | 60 }; |
| 61 | 61 |
| 62 } // namespace policy | 62 } // namespace policy |
| 63 | 63 |
| 64 #endif // CHROME_BROWSER_NET_PROXY_POLICY_HANDLER_H_ | 64 #endif // CHROME_BROWSER_NET_PROXY_POLICY_HANDLER_H_ |
| OLD | NEW |