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

Unified Diff: chrome/browser/policy/configuration_policy_provider_win.cc

Issue 3774003: Cleanup and style guideline conformance for policy implementation (Closed) Base URL: git://codf21.jail/chromium.git
Patch Set: fix windows build and tests 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/policy/configuration_policy_provider_win.cc
diff --git a/chrome/browser/policy/configuration_policy_provider_win.cc b/chrome/browser/policy/configuration_policy_provider_win.cc
index 50e2fc5732f8006cd84f67e792ea7f4f01105df2..8f86973fb5ce3de79c3fb11a4abab6eef42ac256 100644
--- a/chrome/browser/policy/configuration_policy_provider_win.cc
+++ b/chrome/browser/policy/configuration_policy_provider_win.cc
@@ -145,7 +145,9 @@ void ConfigurationPolicyProviderWin::GroupPolicyChangeWatcher::
void ConfigurationPolicyProviderWin::GroupPolicyChangeWatcher::
OnObjectSignaled(HANDLE object) {
DCHECK(object == user_policy_changed_event_.handle() ||
- object == machine_policy_changed_event_.handle());
+ object == machine_policy_changed_event_.handle())
+ << "unexpected object signaled policy reload, obj = "
+ << std::showbase << std::hex << object;
Reload();
}
@@ -168,7 +170,7 @@ ConfigurationPolicyProviderWin::~ConfigurationPolicyProviderWin() {
}
bool ConfigurationPolicyProviderWin::GetRegistryPolicyString(
- const string16& name, string16* result) {
+ const string16& name, string16* result) const {
string16 path = string16(kRegistrySubKey);
RegKey policy_key;
// First try the global policy.
@@ -184,7 +186,7 @@ bool ConfigurationPolicyProviderWin::GetRegistryPolicyString(
}
bool ConfigurationPolicyProviderWin::GetRegistryPolicyStringList(
- const string16& key, ListValue* result) {
+ const string16& key, ListValue* result) const {
string16 path = string16(kRegistrySubKey);
path += ASCIIToUTF16("\\") + key;
RegKey policy_key;
@@ -204,7 +206,7 @@ bool ConfigurationPolicyProviderWin::GetRegistryPolicyStringList(
}
bool ConfigurationPolicyProviderWin::GetRegistryPolicyBoolean(
- const string16& value_name, bool* result) {
+ const string16& value_name, bool* result) const {
DWORD value;
RegKey hkcu_policy_key(HKEY_LOCAL_MACHINE, kRegistrySubKey, KEY_READ);
if (hkcu_policy_key.ReadValueDW(value_name.c_str(), &value)) {
@@ -221,7 +223,7 @@ bool ConfigurationPolicyProviderWin::GetRegistryPolicyBoolean(
}
bool ConfigurationPolicyProviderWin::GetRegistryPolicyInteger(
- const string16& value_name, uint32* result) {
+ const string16& value_name, uint32* result) const {
DWORD value;
RegKey hkcu_policy_key(HKEY_LOCAL_MACHINE, kRegistrySubKey, KEY_READ);
if (hkcu_policy_key.ReadValueDW(value_name.c_str(), &value)) {
@@ -238,7 +240,7 @@ bool ConfigurationPolicyProviderWin::GetRegistryPolicyInteger(
}
bool ConfigurationPolicyProviderWin::Provide(
- ConfigurationPolicyStore* store) {
+ ConfigurationPolicyStoreInterface* store) {
const PolicyDefinitionList* policy_list(policy_definition_list());
for (const PolicyDefinitionList::Entry* current = policy_list->begin;
current != policy_list->end; ++current) {

Powered by Google App Engine
This is Rietveld 408576698