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

Issue 6705031: Send policy blobs to session_manager (Closed)

Created:
9 years, 9 months ago by Jakob Kummerow
Modified:
9 years, 6 months ago
CC:
chromium-reviews, nkostylev+cc_chromium.org, davemoore+watch_chromium.org, Paweł Hajdan Jr.
Visibility:
Public.

Description

Send policy blobs to session_manager And also read policy back from session_manager into CloudPolicyCache, but there are no consumers of those values yet. BUG=chromium-os:11258 TEST=UserPolicyCacheTest.*; DevicePolicyCacheTest.* Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=79677

Patch Set 1 #

Total comments: 52

Patch Set 2 : addressed comments; rebased #

Total comments: 13

Patch Set 3 : fix nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1284 lines, -1342 lines) Patch
M chrome/browser/chromeos/login/signed_settings_helper.h View 1 3 chunks +18 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/login/signed_settings_helper.cc View 1 12 chunks +86 lines, -13 lines 0 comments Download
M chrome/browser/policy/browser_policy_connector.cc View 2 chunks +6 lines, -21 lines 0 comments Download
D chrome/browser/policy/cloud_policy_cache.h View 1 1 chunk +0 lines, -149 lines 0 comments Download
D chrome/browser/policy/cloud_policy_cache.cc View 1 1 chunk +0 lines, -462 lines 0 comments Download
A chrome/browser/policy/cloud_policy_cache_base.h View 1 2 1 chunk +128 lines, -0 lines 0 comments Download
A chrome/browser/policy/cloud_policy_cache_base.cc View 1 2 1 chunk +154 lines, -0 lines 0 comments Download
D chrome/browser/policy/cloud_policy_cache_unittest.cc View 1 1 chunk +0 lines, -651 lines 0 comments Download
M chrome/browser/policy/cloud_policy_controller.h View 1 5 chunks +5 lines, -5 lines 0 comments Download
M chrome/browser/policy/cloud_policy_controller.cc View 1 4 chunks +5 lines, -4 lines 0 comments Download
M chrome/browser/policy/cloud_policy_controller_unittest.cc View 1 2 4 chunks +5 lines, -5 lines 0 comments Download
M chrome/browser/policy/cloud_policy_subsystem.h View 1 3 chunks +4 lines, -5 lines 0 comments Download
M chrome/browser/policy/cloud_policy_subsystem.cc View 2 chunks +5 lines, -5 lines 0 comments Download
A chrome/browser/policy/device_policy_cache.h View 1 2 1 chunk +66 lines, -0 lines 0 comments Download
A chrome/browser/policy/device_policy_cache.cc View 1 1 chunk +97 lines, -0 lines 0 comments Download
A chrome/browser/policy/device_policy_cache_unittest.cc View 1 1 chunk +142 lines, -0 lines 0 comments Download
M chrome/browser/policy/device_token_fetcher.h View 1 4 chunks +5 lines, -5 lines 0 comments Download
M chrome/browser/policy/device_token_fetcher.cc View 1 4 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/policy/device_token_fetcher_unittest.cc View 1 3 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/policy/profile_policy_connector.cc View 2 chunks +3 lines, -2 lines 0 comments Download
A chrome/browser/policy/user_policy_cache.h View 1 1 chunk +43 lines, -0 lines 0 comments Download
A chrome/browser/policy/user_policy_cache.cc View 1 1 chunk +153 lines, -0 lines 0 comments Download
A chrome/browser/policy/user_policy_cache_unittest.cc View 1 1 chunk +338 lines, -0 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 4 chunks +7 lines, -2 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 chunks +3 lines, -1 line 0 comments Download
M chrome/common/chrome_switches.h View 1 2 chunks +1 line, -1 line 0 comments Download
M chrome/common/chrome_switches.cc View 1 2 chunks +3 lines, -4 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
Jakob Kummerow
Chris: Please review the changes to signed_settings_helper.{h,cc}. Mattias: Please review the other changes. They're less ...
9 years, 9 months ago (2011-03-23 18:20:12 UTC) #1
Chris Masone
SignedSettingsHelper stuff LGTM On 2011/03/23 18:20:12, jkummerow wrote: > Chris: Please review the changes to ...
9 years, 9 months ago (2011-03-23 22:54:18 UTC) #2
Chris Masone
http://codereview.chromium.org/6705031/diff/1/chrome/browser/chromeos/login/signed_settings_helper.cc File chrome/browser/chromeos/login/signed_settings_helper.cc (right): http://codereview.chromium.org/6705031/diff/1/chrome/browser/chromeos/login/signed_settings_helper.cc#newcode243 chrome/browser/chromeos/login/signed_settings_helper.cc:243: virtual void OnSettingsCompleted(SignedSettings::ReturnCode code, On SettingsOpCompleted, no? http://codereview.chromium.org/6705031/diff/1/chrome/browser/chromeos/login/signed_settings_helper.cc#newcode271 chrome/browser/chromeos/login/signed_settings_helper.cc:271: ...
9 years, 9 months ago (2011-03-23 23:03:53 UTC) #3
Mattias Nissler (ping if slow)
Looks pretty good already, but a few issues to resolve. http://codereview.chromium.org/6705031/diff/1/chrome/browser/chromeos/login/signed_settings_helper.cc File chrome/browser/chromeos/login/signed_settings_helper.cc (right): http://codereview.chromium.org/6705031/diff/1/chrome/browser/chromeos/login/signed_settings_helper.cc#newcode243 ...
9 years, 9 months ago (2011-03-24 18:55:57 UTC) #4
Jakob Kummerow
Thanks for the comments. Chris: This CL is now based on the updated SignedSettings method ...
9 years, 9 months ago (2011-03-28 13:53:53 UTC) #5
Chris Masone
SignedSettingsHelper stuff LGTM
9 years, 9 months ago (2011-03-28 20:57:21 UTC) #6
Mattias Nissler (ping if slow)
LGTM with a few nits. http://codereview.chromium.org/6705031/diff/10001/chrome/browser/policy/cloud_policy_cache_base.cc File chrome/browser/policy/cloud_policy_cache_base.cc (right): http://codereview.chromium.org/6705031/diff/10001/chrome/browser/policy/cloud_policy_cache_base.cc#newcode16 chrome/browser/policy/cloud_policy_cache_base.cc:16: // CloudPolicyCache for hooking ...
9 years, 9 months ago (2011-03-29 08:58:39 UTC) #7
Jakob Kummerow
http://codereview.chromium.org/6705031/diff/10001/chrome/browser/policy/cloud_policy_cache_base.cc File chrome/browser/policy/cloud_policy_cache_base.cc (right): http://codereview.chromium.org/6705031/diff/10001/chrome/browser/policy/cloud_policy_cache_base.cc#newcode16 chrome/browser/policy/cloud_policy_cache_base.cc:16: // CloudPolicyCache for hooking up with ConfigurationPolicyPrefStore. On 2011/03/29 ...
9 years, 9 months ago (2011-03-29 09:33:37 UTC) #8
Mattias Nissler (ping if slow)
9 years, 9 months ago (2011-03-29 10:25:48 UTC) #9
http://codereview.chromium.org/6705031/diff/10001/chrome/browser/policy/cloud...
File chrome/browser/policy/cloud_policy_cache_base.cc (right):

http://codereview.chromium.org/6705031/diff/10001/chrome/browser/policy/cloud...
chrome/browser/policy/cloud_policy_cache_base.cc:83: timestamp =
&temp_timestamp;
On 2011/03/29 09:33:37, jkummerow wrote:
> On 2011/03/29 08:58:39, Mattias Nissler wrote:
> > Why not just DCHECK(timestamp)?
> 
> Because we need a non-NULL |timestamp| to perform what
> |check_for_timestamp_validity| instructs us to do, but I thought it'd be nice
if
> this implementation detail was hidden from callers. This way, they can pass in
> NULL for |timestamp| if they don't care, and this method works correctly for
all
> possible combinations of inputs.
> 
> I can see a less "hacky" way to do it: always use |temp_timestamp| in the call
> to DecodePolicyResponse below, and then do:
> if (timestamp) { *timestamp = temp_timestamp; }
> Would you prefer that?

This is a nit, so I'd be happy either way.

My point was this: Why support passing NULL pointers at all? Doesn't hurt the
callers to just have a dummy timestamp local they don't look at and makes the
code here much cleaner.

Powered by Google App Engine
This is Rietveld 408576698