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

Issue 8258018: Generate Chrome policy definition list from policy_templates.json. (Closed)

Created:
9 years, 2 months ago by Joao da Silva
Modified:
9 years, 2 months ago
CC:
chromium-reviews, pam+watch_chromium.org, kkania, Paweł Hajdan Jr.
Visibility:
Public.

Description

Generate Chrome policy definition list from policy_templates.json. The struct and static array is now generated into policy_constants.h. Added policy::GetChromePolicyDefinitionList() and policy::GetPolicyName(). Removed ConfigurationPolicyProvider::PolicyDefinitionList. Removed PolicyStates::GetPolicyName(). Removed ConfigurationPolicyPrefStore::GetChromePolicyDefinitionList(). BUG=None TEST=Everything works as before, nothing breaks Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=105388

Patch Set 1 #

Total comments: 20

Patch Set 2 : Reviewed #

Total comments: 8

Patch Set 3 : Rebased, reviewed, fixed unit_tests #

Patch Set 4 : Fix win64 build, remove device_only policies from other unittests #

Total comments: 4

Patch Set 5 : Fix the unittest fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+233 lines, -407 lines) Patch
M chrome/app/policy/cloud_policy_codegen.gyp View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/app/policy/policy_templates.json View 1 2 2 chunks +17 lines, -11 lines 0 comments Download
M chrome/browser/automation/testing_automation_provider.cc View 4 chunks +6 lines, -6 lines 0 comments Download
M chrome/browser/automation/testing_automation_provider_chromeos.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/policy/asynchronous_policy_provider_unittest.cc View 2 chunks +2 lines, -4 lines 0 comments Download
M chrome/browser/policy/browser_policy_connector.cc View 4 chunks +5 lines, -6 lines 0 comments Download
M chrome/browser/policy/cloud_policy_provider.h View 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/policy/cloud_policy_provider.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/policy/cloud_policy_provider_impl.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/policy/cloud_policy_provider_unittest.cc View 4 chunks +8 lines, -7 lines 0 comments Download
M chrome/browser/policy/config_dir_policy_provider.h View 1 chunk +2 lines, -3 lines 0 comments Download
M chrome/browser/policy/config_dir_policy_provider.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/policy/config_dir_policy_provider_unittest.cc View 1 2 3 4 7 chunks +18 lines, -24 lines 0 comments Download
M chrome/browser/policy/configuration_policy_pref_store.h View 2 chunks +0 lines, -7 lines 0 comments Download
M chrome/browser/policy/configuration_policy_pref_store.cc View 1 chunk +0 lines, -196 lines 0 comments Download
M chrome/browser/policy/configuration_policy_provider.h View 2 chunks +1 line, -13 lines 0 comments Download
M chrome/browser/policy/configuration_policy_provider_delegate_win.h View 2 chunks +2 lines, -4 lines 0 comments Download
M chrome/browser/policy/configuration_policy_provider_delegate_win.cc View 1 chunk +2 lines, -3 lines 0 comments Download
M chrome/browser/policy/configuration_policy_provider_mac.h View 3 chunks +5 lines, -6 lines 0 comments Download
M chrome/browser/policy/configuration_policy_provider_mac.cc View 4 chunks +5 lines, -4 lines 0 comments Download
M chrome/browser/policy/configuration_policy_provider_mac_unittest.cc View 1 2 3 4 8 chunks +11 lines, -12 lines 0 comments Download
M chrome/browser/policy/configuration_policy_provider_win_unittest.cc View 1 2 3 4 5 chunks +8 lines, -9 lines 0 comments Download
M chrome/browser/policy/configuration_policy_reader.h View 1 chunk +0 lines, -8 lines 0 comments Download
M chrome/browser/policy/configuration_policy_reader.cc View 5 chunks +3 lines, -32 lines 0 comments Download
M chrome/browser/policy/configuration_policy_reader_unittest.cc View 3 chunks +1 line, -13 lines 0 comments Download
M chrome/browser/policy/file_based_policy_provider.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/policy/file_based_policy_provider_unittest.cc View 1 2 chunks +4 lines, -6 lines 0 comments Download
M chrome/browser/policy/mock_configuration_policy_provider.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/policy/policy_map.h View 1 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/policy/policy_map.cc View 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/policy/user_policy_cache.cc View 2 chunks +2 lines, -3 lines 0 comments Download
M chrome/tools/build/generate_policy_source.py View 1 2 3 4 5 chunks +114 lines, -17 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
Joao da Silva
Please review, thanks!
9 years, 2 months ago (2011-10-13 13:47:37 UTC) #1
Mattias Nissler (ping if slow)
couple of nits. http://codereview.chromium.org/8258018/diff/1/chrome/app/policy/policy_templates.json File chrome/app/policy/policy_templates.json (right): http://codereview.chromium.org/8258018/diff/1/chrome/app/policy/policy_templates.json#newcode78 chrome/app/policy/policy_templates.json:78: # The product name also affects ...
9 years, 2 months ago (2011-10-13 14:14:34 UTC) #2
Joao da Silva
Reviewed, PTAL. Hopefully also fixed the clang and chromeos build. http://codereview.chromium.org/8258018/diff/1/chrome/browser/policy/configuration_policy_provider_mac_unittest.cc File chrome/browser/policy/configuration_policy_provider_mac_unittest.cc (right): http://codereview.chromium.org/8258018/diff/1/chrome/browser/policy/configuration_policy_provider_mac_unittest.cc#newcode143 ...
9 years, 2 months ago (2011-10-13 14:40:43 UTC) #3
Mattias Nissler (ping if slow)
LGTM http://codereview.chromium.org/8258018/diff/3003/chrome/tools/build/generate_policy_source.py File chrome/tools/build/generate_policy_source.py (right): http://codereview.chromium.org/8258018/diff/3003/chrome/tools/build/generate_policy_source.py#newcode108 chrome/tools/build/generate_policy_source.py:108: if "chrome" in z and not w ] ...
9 years, 2 months ago (2011-10-13 14:58:00 UTC) #4
pastarmovj
LGTM. Great negative (LOC-wise) contribution! Only a style nit. http://codereview.chromium.org/8258018/diff/3003/chrome/tools/build/generate_policy_source.py File chrome/tools/build/generate_policy_source.py (right): http://codereview.chromium.org/8258018/diff/3003/chrome/tools/build/generate_policy_source.py#newcode103 chrome/tools/build/generate_policy_source.py:103: ...
9 years, 2 months ago (2011-10-13 15:00:45 UTC) #5
Joao da Silva
One last round :-) Please notice these additional changes: - comment on policy_templates.json - changes ...
9 years, 2 months ago (2011-10-13 16:31:16 UTC) #6
Mattias Nissler (ping if slow)
still LGTM, with even more creative list building proposals :) http://codereview.chromium.org/8258018/diff/9002/chrome/tools/build/generate_policy_source.py File chrome/tools/build/generate_policy_source.py (right): http://codereview.chromium.org/8258018/diff/9002/chrome/tools/build/generate_policy_source.py#newcode109 ...
9 years, 2 months ago (2011-10-13 16:45:03 UTC) #7
Joao da Silva
http://codereview.chromium.org/8258018/diff/9002/chrome/tools/build/generate_policy_source.py File chrome/tools/build/generate_policy_source.py (right): http://codereview.chromium.org/8258018/diff/9002/chrome/tools/build/generate_policy_source.py#newcode109 chrome/tools/build/generate_policy_source.py:109: if "chrome" in platforms and not is_device_only] On 2011/10/13 ...
9 years, 2 months ago (2011-10-13 17:38:17 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/joaodasilva@chromium.org/8258018/5004
9 years, 2 months ago (2011-10-13 20:18:52 UTC) #9
commit-bot: I haz the power
9 years, 2 months ago (2011-10-13 22:12:41 UTC) #10
Change committed as 105388

Powered by Google App Engine
This is Rietveld 408576698