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

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

Issue 2858060: Changing policy while Chrome is running should refresh preferences without relaunching (Closed)
Patch Set: changed name of mock Created 10 years, 4 months 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
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/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
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
OLDNEW
« no previous file with comments | « chrome/browser/configuration_policy_provider.h ('k') | chrome/browser/configuration_policy_provider_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698