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 #include "chrome/common/policy_constants.h" | 8 #include "chrome/common/policy_constants.h" |
| 9 #include "chrome/common/notification_service.h" |
9 | 10 |
10 namespace { | 11 namespace { |
11 | 12 |
12 // TODO(avi): Use this mapping to auto-generate MCX manifests and Windows | 13 // TODO(avi): Use this mapping to auto-generate MCX manifests and Windows |
13 // ADM/ADMX files. http://crbug.com/49316 | 14 // ADM/ADMX files. http://crbug.com/49316 |
14 | 15 |
15 struct InternalPolicyValueMapEntry { | 16 struct InternalPolicyValueMapEntry { |
16 ConfigurationPolicyStore::PolicyType policy_type; | 17 ConfigurationPolicyStore::PolicyType policy_type; |
17 Value::ValueType value_type; | 18 Value::ValueType value_type; |
18 const char* name; | 19 const char* name; |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 const InternalPolicyValueMapEntry& internal_entry = kPolicyValueMap[i]; | 64 const InternalPolicyValueMapEntry& internal_entry = kPolicyValueMap[i]; |
64 PolicyValueMapEntry entry; | 65 PolicyValueMapEntry entry; |
65 entry.policy_type = internal_entry.policy_type; | 66 entry.policy_type = internal_entry.policy_type; |
66 entry.value_type = internal_entry.value_type; | 67 entry.value_type = internal_entry.value_type; |
67 entry.name = std::string(internal_entry.name); | 68 entry.name = std::string(internal_entry.name); |
68 mapping->push_back(entry); | 69 mapping->push_back(entry); |
69 } | 70 } |
70 } | 71 } |
71 return mapping; | 72 return mapping; |
72 } | 73 } |
| 74 |
| 75 void ConfigurationPolicyProvider::NotifyStoreOfPolicyChange() { |
| 76 NotificationService::current()->Notify( |
| 77 NotificationType::POLICY_CHANGED, |
| 78 Source<ConfigurationPolicyProvider>(this), |
| 79 NotificationService::NoDetails()); |
| 80 } |
| 81 |
OLD | NEW |