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

Issue 2275963004: Apply default policy values also on non-ChromeOS

Created:
4 years, 3 months ago by Marc Treib
Modified:
4 years, 3 months ago
CC:
chromium-reviews, oshima+watch_chromium.org, davemoore+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Apply default policy values also on non-ChromeOS BUG=640950

Patch Set 1 #

Patch Set 2 : . #

Patch Set 3 : update tests #

Total comments: 3

Patch Set 4 : move down into UserCloudPolicyManager[ChromeOS] #

Unified diffs Side-by-side diffs Delta from patch set Stats (+19 lines, -11 lines) Patch
M chrome/browser/policy/cloud/cloud_policy_browsertest.cc View 1 2 4 chunks +1 line, -4 lines 0 comments Download
M components/policy/core/common/cloud/user_cloud_policy_manager.h View 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M components/policy/core/common/cloud/user_cloud_policy_manager.cc View 2 3 2 chunks +12 lines, -0 lines 0 comments Download
M components/policy/tools/generate_policy_source.py View 3 chunks +3 lines, -7 lines 0 comments Download

Messages

Total messages: 15 (11 generated)
Marc Treib
PTAL - is this what you had in mind? Thanks!
4 years, 3 months ago (2016-08-25 15:34:42 UTC) #5
Marc Treib
https://codereview.chromium.org/2275963004/diff/40001/components/policy/core/common/cloud/cloud_policy_manager.cc File components/policy/core/common/cloud/cloud_policy_manager.cc (right): https://codereview.chromium.org/2275963004/diff/40001/components/policy/core/common/cloud/cloud_policy_manager.cc#newcode116 components/policy/core/common/cloud/cloud_policy_manager.cc:116: SetEnterpriseUsersDefaults(policy_map); This doesn't quite match the "spec" in the ...
4 years, 3 months ago (2016-08-25 15:52:07 UTC) #7
Andrew T Wilson (Slow)
I think your test failures will go away if you move the GetChromePolicy() override down ...
4 years, 3 months ago (2016-08-26 07:56:50 UTC) #10
Marc Treib
4 years, 3 months ago (2016-08-26 09:19:19 UTC) #15
Thanks! I moved it into the two UCPMs, now the tests seem to be happy, but
there's still a linker error on Windows... I'll investigate.

https://codereview.chromium.org/2275963004/diff/40001/components/policy/core/...
File components/policy/core/common/cloud/cloud_policy_manager.cc (right):

https://codereview.chromium.org/2275963004/diff/40001/components/policy/core/...
components/policy/core/common/cloud/cloud_policy_manager.cc:116:
SetEnterpriseUsersDefaults(policy_map);
On 2016/08/26 07:56:50, Andrew T Wilson (Slow) wrote:
> On 2016/08/25 15:52:07, Marc Treib wrote:
> > This doesn't quite match the "spec" in the bug: I've moved it to
> > CloudPolicyManager rather than UserCloudPolicyManager, because the latter is
> > used only on non-ChromeOS platforms as far as I can tell.
> 
> I'm a bit concerned about this because it will now populate those policies in
> device policy, when we really only want them populated in user policy.
> 
> I think it really does belong in UserCloudPolicyManager, and it's gross that
> UserCloudPolicyManagerChromeOS doesn't derive from UserCloudPolicyManager, but
> that just means you'll need to put it in two places (both UCPM and
> UCPMChromeOS). On the bright side, it makes this patch smaller :D

Yup, this code duplication is what I was trying to avoid... oh well. It's now in
both UserCloudPolicyManager[ChromeOS].

Powered by Google App Engine
This is Rietveld 408576698