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

Issue 13619014: Change PolicyLoaderWin to load PReg files if possible. (Closed)

Created:
7 years, 8 months ago by Mattias Nissler (ping if slow)
Modified:
7 years, 8 months ago
CC:
chromium-reviews
Visibility:
Public.

Description

Change PolicyLoaderWin to load PReg files if possible. We now query whether GPO is present and read directly from the corresponding PReg files. The registry is used only as a fallback source for policy values. To accomplish this, PolicyLoaderWin now works in two steps: It first converts the GPO input into base::Value representation and then maps that to proper policy values. This also unifies the handling for Chrome policy and 3rd-party policy. BUG= TEST=unit tests TBR=grt@chromium.org, cpu@chromium.org, ben@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=193649 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=193961

Patch Set 1 #

Total comments: 30

Patch Set 2 : Address comments, add unit tests. #

Total comments: 19

Patch Set 3 : Address comments, add tests requested by Joao #

Patch Set 4 : Rebase #

Patch Set 5 : Switch to kRegistryChromePolicyKey in CF code. #

Patch Set 6 : Rebase, fix the test harness to fail the GPO enumeration. #

Patch Set 7 : Remove stray log line #

Patch Set 8 : Rebase. #

Patch Set 9 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+904 lines, -472 lines) Patch
M chrome/app/breakpad_win.cc View 4 chunks +5 lines, -5 lines 0 comments Download
M chrome/browser/policy/browser_policy_connector.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/policy/policy_loader_win.h View 1 3 chunks +67 lines, -21 lines 0 comments Download
M chrome/browser/policy/policy_loader_win.cc View 1 2 3 4 5 6 7 8 6 chunks +570 lines, -400 lines 0 comments Download
M chrome/browser/policy/policy_loader_win_unittest.cc View 1 2 3 4 5 6 7 20 chunks +245 lines, -20 lines 0 comments Download
M chrome/browser/policy/policy_path_parser_win.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/tools/build/generate_policy_source.py View 1 2 3 3 chunks +8 lines, -17 lines 0 comments Download
M chrome_frame/chrome_launcher.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M chrome_frame/policy_settings.cc View 1 2 3 4 3 chunks +3 lines, -3 lines 0 comments Download
M chrome_frame/test/policy_settings_unittest.cc View 1 2 3 4 3 chunks +3 lines, -3 lines 0 comments Download

Messages

Total messages: 21 (0 generated)
Mattias Nissler (ping if slow)
Hope you like it, it's shorter than before. The unit tests need some love, but ...
7 years, 8 months ago (2013-04-04 20:58:04 UTC) #1
Mattias Nissler (ping if slow)
Hm, it's actually not shorter? My diffstat must have fooled me ;)
7 years, 8 months ago (2013-04-04 20:59:52 UTC) #2
Mattias Nissler (ping if slow)
Oh, and the unit tests actually all pass, but the PReg reading is not covered.
7 years, 8 months ago (2013-04-04 21:00:24 UTC) #3
Joao da Silva
Looks good. I'm not sure about how GPO does some things, questions inline. https://codereview.chromium.org/13619014/diff/1/chrome/browser/policy/policy_loader_win.cc File ...
7 years, 8 months ago (2013-04-05 13:55:00 UTC) #4
Mattias Nissler (ping if slow)
This is tested and seems to be working fine now, ready for thorough review now. ...
7 years, 8 months ago (2013-04-09 22:43:38 UTC) #5
Joao da Silva
lgtm https://codereview.chromium.org/13619014/diff/10001/chrome/browser/policy/policy_loader_win.cc File chrome/browser/policy/policy_loader_win.cc (right): https://codereview.chromium.org/13619014/diff/10001/chrome/browser/policy/policy_loader_win.cc#newcode11 chrome/browser/policy/policy_loader_win.cc:11: #include <shlwapi.h> // For PathIsUNC() Suggestion: I find ...
7 years, 8 months ago (2013-04-10 12:32:12 UTC) #6
Mattias Nissler (ping if slow)
Thanks for the review! Unless you have further comments on the test changes, I'm going ...
7 years, 8 months ago (2013-04-10 13:20:25 UTC) #7
Joao da Silva
lgtm https://codereview.chromium.org/13619014/diff/10001/chrome/browser/policy/policy_loader_win_unittest.cc File chrome/browser/policy/policy_loader_win_unittest.cc (right): https://codereview.chromium.org/13619014/diff/10001/chrome/browser/policy/policy_loader_win_unittest.cc#newcode463 chrome/browser/policy/policy_loader_win_unittest.cc:463: } On 2013/04/10 13:20:25, Mattias Nissler wrote: > ...
7 years, 8 months ago (2013-04-10 13:32:17 UTC) #8
Mattias Nissler (ping if slow)
TBR additions in preparation for committing. kRegistryChromePolicyKey constant rename: cpu for chrome/app/breakpad_win.cc grt for chrome_frame/ ...
7 years, 8 months ago (2013-04-11 11:07:59 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mnissler@chromium.org/13619014/32001
7 years, 8 months ago (2013-04-11 13:45:20 UTC) #10
commit-bot: I haz the power
Presubmit check for 13619014-32001 failed and returned exit status 1. INFO:root:Found 10 file(s). Running presubmit ...
7 years, 8 months ago (2013-04-11 13:45:42 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mnissler@chromium.org/13619014/32001
7 years, 8 months ago (2013-04-11 13:49:07 UTC) #12
commit-bot: I haz the power
Presubmit check for 13619014-32001 failed and returned exit status 1. INFO:root:Found 10 file(s). Running presubmit ...
7 years, 8 months ago (2013-04-11 13:49:25 UTC) #13
Mattias Nissler (ping if slow)
Committed patchset #5 manually as r193649 (presubmit successful).
7 years, 8 months ago (2013-04-11 15:23:32 UTC) #14
Mattias Nissler (ping if slow)
Julian, I'd like to reland this after fixing the unit tests, can you take a ...
7 years, 8 months ago (2013-04-12 10:11:42 UTC) #15
pastarmovj
lgtm
7 years, 8 months ago (2013-04-12 11:39:06 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mnissler@chromium.org/13619014/11011
7 years, 8 months ago (2013-04-12 12:19:58 UTC) #17
commit-bot: I haz the power
Failed to apply patch for chrome/browser/policy/policy_loader_win_unittest.cc: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
7 years, 8 months ago (2013-04-12 12:20:00 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mnissler@chromium.org/13619014/68001
7 years, 8 months ago (2013-04-12 16:36:54 UTC) #19
commit-bot: I haz the power
Presubmit check for 13619014-68001 failed and returned exit status 1. INFO:root:Found 10 file(s). Running presubmit ...
7 years, 8 months ago (2013-04-12 16:36:59 UTC) #20
Mattias Nissler (ping if slow)
7 years, 8 months ago (2013-04-12 17:55:20 UTC) #21
Message was sent while issue was closed.
Committed patchset #9 manually as r193961 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698