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 26 matching lines...) Expand all Loading... |
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::kPolicyPasswordManagerEnabled, | 43 { ConfigurationPolicyStore::kPolicyPasswordManagerEnabled, |
44 Value::TYPE_BOOLEAN, "PasswordManagerEnabled" }, | 44 Value::TYPE_BOOLEAN, "PasswordManagerEnabled" }, |
45 { ConfigurationPolicyStore::kPolicyDisabledPlugins, | 45 { ConfigurationPolicyStore::kPolicyDisabledPlugins, |
46 Value::TYPE_STRING, "DisabledPluginsList" }, | 46 Value::TYPE_STRING, "DisabledPluginsList" }, |
| 47 { ConfigurationPolicyStore::kPolicyApplicationLocale, |
| 48 Value::TYPE_STRING, "ApplicationLocaleValue" }, |
47 { ConfigurationPolicyStore::kPolicySyncDisabled, | 49 { ConfigurationPolicyStore::kPolicySyncDisabled, |
48 Value::TYPE_BOOLEAN, "SyncDisabled" }, | 50 Value::TYPE_BOOLEAN, "SyncDisabled" }, |
49 }; | 51 }; |
50 | 52 |
51 } // namespace | 53 } // namespace |
52 | 54 |
53 /* static */ | 55 /* static */ |
54 const ConfigurationPolicyProvider::PolicyValueMap* | 56 const ConfigurationPolicyProvider::PolicyValueMap* |
55 ConfigurationPolicyProvider::PolicyValueMapping() { | 57 ConfigurationPolicyProvider::PolicyValueMapping() { |
56 static PolicyValueMap* mapping; | 58 static PolicyValueMap* mapping; |
57 if (!mapping) { | 59 if (!mapping) { |
58 mapping = new PolicyValueMap(); | 60 mapping = new PolicyValueMap(); |
59 for (size_t i = 0; i < arraysize(kPolicyValueMap); ++i) { | 61 for (size_t i = 0; i < arraysize(kPolicyValueMap); ++i) { |
60 const InternalPolicyValueMapEntry& internal_entry = kPolicyValueMap[i]; | 62 const InternalPolicyValueMapEntry& internal_entry = kPolicyValueMap[i]; |
61 PolicyValueMapEntry entry; | 63 PolicyValueMapEntry entry; |
62 entry.policy_type = internal_entry.policy_type; | 64 entry.policy_type = internal_entry.policy_type; |
63 entry.value_type = internal_entry.value_type; | 65 entry.value_type = internal_entry.value_type; |
64 entry.name = std::string(internal_entry.name); | 66 entry.name = std::string(internal_entry.name); |
65 mapping->push_back(entry); | 67 mapping->push_back(entry); |
66 } | 68 } |
67 } | 69 } |
68 return mapping; | 70 return mapping; |
69 } | 71 } |
OLD | NEW |