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

Unified Diff: chrome/tools/build/generate_policy_source.py

Issue 13619014: Change PolicyLoaderWin to load PReg files if possible. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/tools/build/generate_policy_source.py
diff --git a/chrome/tools/build/generate_policy_source.py b/chrome/tools/build/generate_policy_source.py
index 55f3ed70086ba59341ecefb7b4b59c275c2b8e72..2f74ad4823222886921aade3bee673d2aa01c9c5 100755
--- a/chrome/tools/build/generate_policy_source.py
+++ b/chrome/tools/build/generate_policy_source.py
@@ -18,10 +18,8 @@ import sys
import textwrap
-CHROME_MANDATORY_SUBKEY = 'SOFTWARE\\\\Policies\\\\Google\\\\Chrome'
-CHROME_RECOMMENDED_SUBKEY = CHROME_MANDATORY_SUBKEY + '\\\\Recommended'
-CHROMIUM_MANDATORY_SUBKEY = 'SOFTWARE\\\\Policies\\\\Chromium'
-CHROMIUM_RECOMMENDED_SUBKEY = CHROMIUM_MANDATORY_SUBKEY + '\\\\Recommended'
+CHROME_POLICY_KEY = 'SOFTWARE\\\\Policies\\\\Google\\\\Chrome'
+CHROMIUM_POLICY_KEY = 'SOFTWARE\\\\Policies\\\\Chromium'
TYPE_MAP = {
'dict': 'TYPE_DICTIONARY',
@@ -177,12 +175,9 @@ def _WritePolicyConstantHeader(template_file_contents, args, opts):
'namespace policy {\n\n')
if os == 'win':
- f.write('// The windows registry path where mandatory policy '
+ f.write('// The windows registry path where Chrome policy '
'configuration resides.\n'
- 'extern const wchar_t kRegistryMandatorySubKey[];\n'
- '// The windows registry path where recommended policy '
- 'configuration resides.\n'
- 'extern const wchar_t kRegistryRecommendedSubKey[];\n\n')
+ 'extern const wchar_t kRegistryChromePolicyKey[];\n')
f.write('// Lists policy types mapped to their names and expected types.\n'
'// Used to initialize ConfigurationPolicyProviders.\n'
@@ -259,15 +254,11 @@ def _WritePolicyConstantSource(template_file_contents, args, opts):
if os == 'win':
f.write('#if defined(GOOGLE_CHROME_BUILD)\n'
- 'const wchar_t kRegistryMandatorySubKey[] = '
- 'L"' + CHROME_MANDATORY_SUBKEY + '";\n'
- 'const wchar_t kRegistryRecommendedSubKey[] = '
- 'L"' + CHROME_RECOMMENDED_SUBKEY + '";\n'
+ 'const wchar_t kRegistryChromePolicyKey[] = '
+ 'L"' + CHROME_POLICY_KEY + '";\n'
'#else\n'
- 'const wchar_t kRegistryMandatorySubKey[] = '
- 'L"' + CHROMIUM_MANDATORY_SUBKEY + '";\n'
- 'const wchar_t kRegistryRecommendedSubKey[] = '
- 'L"' + CHROMIUM_RECOMMENDED_SUBKEY + '";\n'
+ 'const wchar_t kRegistryChromePolicyKey[] = '
+ 'L"' + CHROMIUM_POLICY_KEY + '";\n'
'#endif\n\n')
f.write('bool IsDeprecatedPolicy(const std::string& policy) {\n'
« chrome/browser/policy/policy_loader_win.cc ('K') | « chrome/browser/policy/policy_path_parser_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698