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

Unified Diff: chrome/browser/policy/configuration_policy_provider_delegate_win.h

Issue 6091002: Refactor the windows policy provider to use AsynchronousPolicyProvider. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix windows tests Created 10 years 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_delegate_win.h
diff --git a/chrome/browser/policy/configuration_policy_provider_delegate_win.h b/chrome/browser/policy/configuration_policy_provider_delegate_win.h
new file mode 100644
index 0000000000000000000000000000000000000000..63d36b2d438737076914b15da6ec683f0d4da005
--- /dev/null
+++ b/chrome/browser/policy/configuration_policy_provider_delegate_win.h
@@ -0,0 +1,47 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_PROVIDER_DELEGATE_WIN_H_
+#define CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_PROVIDER_DELEGATE_WIN_H_
+#pragma once
+
+#include "chrome/browser/policy/asynchronous_policy_provider.h"
+
+namespace policy {
+
+class ConfigurationPolicyProviderDelegateWin
+ : public AsynchronousPolicyProvider::Delegate {
+ public:
+ ConfigurationPolicyProviderDelegateWin(
+ const ConfigurationPolicyProvider::PolicyDefinitionList*
+ policy_definition_list);
+ virtual ~ConfigurationPolicyProviderDelegateWin() {}
+
+ // AsynchronousPolicyProvider::Delegate overrides:
+ virtual DictionaryValue* Load();
+
+ private:
+ // Methods to perform type-specific policy lookups in the registry.
+ // HKLM is checked first, then HKCU.
+
+ // Reads a string registry value |name| at the specified |key| and puts the
+ // resulting string in |result|.
+ bool GetRegistryPolicyString(const string16& name, string16* result) const;
+ // Gets a list value contained under |key| one level below the policy root.
+ bool GetRegistryPolicyStringList(const string16& key,
+ ListValue* result) const;
+ bool GetRegistryPolicyBoolean(const string16& value_name,
+ bool* result) const;
+ bool GetRegistryPolicyInteger(const string16& value_name,
+ uint32* result) const;
+
+ const ConfigurationPolicyProvider::PolicyDefinitionList*
+ policy_definition_list_;
+
+ DISALLOW_COPY_AND_ASSIGN(ConfigurationPolicyProviderDelegateWin);
+};
+
+} // namespace policy
+
+#endif // CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_PROVIDER_DELEGATE_WIN_H_

Powered by Google App Engine
This is Rietveld 408576698