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

Side by Side Diff: chrome/browser/configuration_policy_provider_win.h

Issue 2119005: [Win] Implement core mechanism to honor Windows Group Policy (Closed)
Patch Set: merge with latest Created 10 years, 7 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_CONFIGURATION_POLICY_PROVIDER_WIN_H_
6 #define CHROME_BROWSER_CONFIGURATION_POLICY_PROVIDER_WIN_H_
7
8 #include "chrome/browser/configuration_policy_store.h"
9 #include "chrome/browser/configuration_policy_provider.h"
10
11 // An implementation of |ConfigurationPolicyProvider| using the
12 // mechanism provided by Windows Groups Policy. Policy decisions are
13 // stored as values in a special section of the Windows Registry.
14 // On a managed machine in a domain, this portion of the registry is
15 // periodically updated by the Windows Group Policy machinery to contain
16 // the latest version of the policy set by administrators.
17 class WinConfigurationPolicyProvider : public ConfigurationPolicyProvider {
18 public:
19 WinConfigurationPolicyProvider();
20 virtual ~WinConfigurationPolicyProvider() { }
21
22 // ConfigurationPolicyProvider method overrides:
23 virtual bool Provide(ConfigurationPolicyStore* store);
24
25 protected:
26 // The sub key path for Chromiums's Group Policy information in the
27 // Windows registry.
28 static const wchar_t kPolicyRegistrySubKey[];
29
30 // Constants specifying the names of policy-specifying registry values
31 // in |kChromiumPolicySubKey|.
32 static const wchar_t kHomepageRegistryValueName[];
33 static const wchar_t kHomepageIsNewTabPageRegistryValueName[];
34 static const wchar_t kCookiesModeRegistryValueName[];
35
36 private:
37 // For each Group Policy registry value that maps to a browser policy, there
38 // is an entry in |registry_to_policy_map_| of type |RegistryPolicyMapEntry|
39 // that specifies the registry value name and the browser policy that it
40 // maps to.
41 struct RegistryPolicyMapEntry {
42 Value::ValueType value_type;
43 ConfigurationPolicyStore::PolicyType policy_type;
44 const wchar_t* registry_value_name;
45 };
46
47 static const RegistryPolicyMapEntry registry_to_policy_map_[];
48
49 // Methods to perfrom type-specific policy lookups in the registry
50 // HKLM is checked fist, then HKLM.
51 bool GetRegistryPolicyString(const wchar_t* value_name, string16* result);
52 bool GetRegistryPolicyBoolean(const wchar_t* value_name, bool* result);
53 bool GetRegistryPolicyInteger(const wchar_t* value_name, uint32* result);
54 };
55
56 #endif // CHROME_BROWSER_CONFIGURATION_POLICY_PROVIDER_WIN_H_
57
OLDNEW
« no previous file with comments | « chrome/browser/configuration_policy_provider.cc ('k') | chrome/browser/configuration_policy_provider_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698