Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(33)

Side by Side Diff: chrome/browser/policy/configuration_policy_provider.cc

Issue 4062002: Dynamic policy refresh support for the Mac. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: s/map/list/, nits. Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/policy/configuration_policy_provider.h" 5 #include "chrome/browser/policy/configuration_policy_provider.h"
6 6
7 #include "base/values.h" 7 #include "base/values.h"
8 #include "chrome/common/notification_service.h" 8 #include "chrome/common/notification_service.h"
9 9
10 namespace policy { 10 namespace policy {
11 11
12 ConfigurationPolicyProvider::ConfigurationPolicyProvider( 12 ConfigurationPolicyProvider::ConfigurationPolicyProvider(
13 const StaticPolicyValueMap& policy_map) { 13 const PolicyDefinitionList* policy_list)
14 for (size_t i = 0; i < policy_map.entry_count; ++i) { 14 : policy_definition_list_(policy_list) {
15 PolicyValueMapEntry entry = {
16 policy_map.entries[i].policy_type,
17 policy_map.entries[i].value_type,
18 std::string(policy_map.entries[i].name)
19 };
20 policy_value_map_.push_back(entry);
21 }
22 } 15 }
23 16
24 ConfigurationPolicyProvider::~ConfigurationPolicyProvider() {} 17 ConfigurationPolicyProvider::~ConfigurationPolicyProvider() {}
25 18
26 void ConfigurationPolicyProvider::NotifyStoreOfPolicyChange() { 19 void ConfigurationPolicyProvider::NotifyStoreOfPolicyChange() {
27 NotificationService::current()->Notify( 20 NotificationService::current()->Notify(
28 NotificationType::POLICY_CHANGED, 21 NotificationType::POLICY_CHANGED,
29 Source<ConfigurationPolicyProvider>(this), 22 Source<ConfigurationPolicyProvider>(this),
30 NotificationService::NoDetails()); 23 NotificationService::NoDetails());
31 } 24 }
32 25
33 } // namespace policy 26 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/policy/configuration_policy_provider.h ('k') | chrome/browser/policy/configuration_policy_provider_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698