| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #include "chrome/browser/configuration_policy_provider.h" | 5 #include "chrome/browser/configuration_policy_provider.h" |
| 6 | 6 |
| 7 #include "base/values.h" | 7 #include "base/values.h" |
| 8 | 8 |
| 9 namespace { | 9 namespace { |
| 10 | 10 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 Value::TYPE_STRING, "ProxyBypassList" }, | 32 Value::TYPE_STRING, "ProxyBypassList" }, |
| 33 { ConfigurationPolicyStore::kPolicyAlternateErrorPagesEnabled, | 33 { ConfigurationPolicyStore::kPolicyAlternateErrorPagesEnabled, |
| 34 Value::TYPE_BOOLEAN, "AlternateErrorPagesEnabled" }, | 34 Value::TYPE_BOOLEAN, "AlternateErrorPagesEnabled" }, |
| 35 { ConfigurationPolicyStore::kPolicySearchSuggestEnabled, | 35 { ConfigurationPolicyStore::kPolicySearchSuggestEnabled, |
| 36 Value::TYPE_BOOLEAN, "SearchSuggestEnabled" }, | 36 Value::TYPE_BOOLEAN, "SearchSuggestEnabled" }, |
| 37 { ConfigurationPolicyStore::kPolicyDnsPrefetchingEnabled, | 37 { ConfigurationPolicyStore::kPolicyDnsPrefetchingEnabled, |
| 38 Value::TYPE_BOOLEAN, "DnsPrefetchingEnabled" }, | 38 Value::TYPE_BOOLEAN, "DnsPrefetchingEnabled" }, |
| 39 { ConfigurationPolicyStore::kPolicySafeBrowsingEnabled, | 39 { ConfigurationPolicyStore::kPolicySafeBrowsingEnabled, |
| 40 Value::TYPE_BOOLEAN, "SafeBrowsingEnabled" }, | 40 Value::TYPE_BOOLEAN, "SafeBrowsingEnabled" }, |
| 41 { ConfigurationPolicyStore::kPolicyMetricsReportingEnabled, | 41 { ConfigurationPolicyStore::kPolicyMetricsReportingEnabled, |
| 42 Value::TYPE_BOOLEAN, "MetricsReportingEnabled" } | 42 Value::TYPE_BOOLEAN, "MetricsReportingEnabled" }, |
| 43 { ConfigurationPolicyStore::kPolicySyncDisabled, |
| 44 Value::TYPE_BOOLEAN, "SyncDisabled" } |
| 43 }; | 45 }; |
| 44 | 46 |
| 45 } // namespace | 47 } // namespace |
| 46 | 48 |
| 47 /* static */ | 49 /* static */ |
| 48 const ConfigurationPolicyProvider::PolicyValueMap* | 50 const ConfigurationPolicyProvider::PolicyValueMap* |
| 49 ConfigurationPolicyProvider::PolicyValueMapping() { | 51 ConfigurationPolicyProvider::PolicyValueMapping() { |
| 50 static PolicyValueMap* mapping; | 52 static PolicyValueMap* mapping; |
| 51 if (!mapping) { | 53 if (!mapping) { |
| 52 mapping = new PolicyValueMap(); | 54 mapping = new PolicyValueMap(); |
| 53 for (size_t i = 0; i < arraysize(kPolicyValueMap); ++i) { | 55 for (size_t i = 0; i < arraysize(kPolicyValueMap); ++i) { |
| 54 const InternalPolicyValueMapEntry& internal_entry = kPolicyValueMap[i]; | 56 const InternalPolicyValueMapEntry& internal_entry = kPolicyValueMap[i]; |
| 55 PolicyValueMapEntry entry; | 57 PolicyValueMapEntry entry; |
| 56 entry.policy_type = internal_entry.policy_type; | 58 entry.policy_type = internal_entry.policy_type; |
| 57 entry.value_type = internal_entry.value_type; | 59 entry.value_type = internal_entry.value_type; |
| 58 entry.name = std::string(internal_entry.name); | 60 entry.name = std::string(internal_entry.name); |
| 59 mapping->push_back(entry); | 61 mapping->push_back(entry); |
| 60 } | 62 } |
| 61 } | 63 } |
| 62 return mapping; | 64 return mapping; |
| 63 } | 65 } |
| OLD | NEW |