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

Issue 5174006: Move DeviceManagementPolicyProvider into the profile. (Closed)

Created:
10 years, 1 month ago by Mattias Nissler (ping if slow)
Modified:
9 years, 7 months ago
Reviewers:
markusheintz_, Nico
CC:
chromium-reviews, Paweł Hajdan Jr., ben+cc_chromium.org, danno, Jakob Kummerow (corp), gfeher
Visibility:
Public.

Description

Move DeviceManagementPolicyProvider into the profile. Previously, we used only one provider, which would break in situations where there are two profiles (which ChromeOS already does), because it would apply the policy to both profiles and not only the logged in one. For this to work properly, we also need to pass the relevant TokenService instance the DeviceTokenFetcher, so the fetcher can decide whether the token is relevant to it by checking whether the TokenService that sent it is the one associated with the right profile. BUG=63608 TEST=existing unit tests succeed Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=66755

Patch Set 1 #

Total comments: 4

Patch Set 2 : Address thakis' comments. #

Total comments: 8

Patch Set 3 : Address feedback. #

Total comments: 14
Unified diffs Side-by-side diffs Delta from patch set Stats (+179 lines, -131 lines) Patch
M chrome/browser/policy/configuration_policy_pref_store.h View 2 chunks +4 lines, -1 line 0 comments Download
M chrome/browser/policy/configuration_policy_pref_store.cc View 5 chunks +16 lines, -17 lines 3 comments Download
M chrome/browser/policy/device_management_policy_provider.h View 4 chunks +11 lines, -14 lines 0 comments Download
M chrome/browser/policy/device_management_policy_provider.cc View 4 chunks +18 lines, -18 lines 0 comments Download
M chrome/browser/policy/device_management_policy_provider_unittest.cc View 1 3 chunks +7 lines, -2 lines 0 comments Download
M chrome/browser/policy/device_token_fetcher.h View 4 chunks +8 lines, -0 lines 4 comments Download
M chrome/browser/policy/device_token_fetcher.cc View 1 2 4 chunks +22 lines, -12 lines 0 comments Download
M chrome/browser/policy/device_token_fetcher_unittest.cc View 1 4 chunks +11 lines, -3 lines 0 comments Download
M chrome/browser/prefs/pref_notifier_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/prefs/pref_value_store.h View 1 2 4 chunks +21 lines, -8 lines 6 comments Download
M chrome/browser/prefs/pref_value_store.cc View 3 chunks +9 lines, -4 lines 0 comments Download
M chrome/browser/profile.h View 2 chunks +8 lines, -0 lines 0 comments Download
M chrome/browser/profile.cc View 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/profile_impl.h View 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/profile_impl.cc View 1 2 3 chunks +28 lines, -0 lines 1 comment Download
M chrome/chrome_tests.gypi View 1 chunk +0 lines, -2 lines 0 comments Download
D chrome/test/device_management_test_util.h View 1 chunk +0 lines, -15 lines 0 comments Download
D chrome/test/device_management_test_util.cc View 1 chunk +0 lines, -33 lines 0 comments Download
M chrome/test/testing_pref_service.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/testing_profile.h View 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
Mattias Nissler (ping if slow)
Please review! Markus, Gabor, Jakob: FYI (for the various dependencies)
10 years, 1 month ago (2010-11-18 13:08:47 UTC) #1
Nico
Please update the CL description with why this is useful. Does it makes things possible ...
10 years, 1 month ago (2010-11-18 13:53:39 UTC) #2
Mattias Nissler (ping if slow)
Addressed comments, new version is up. It now has a nice description and even an ...
10 years, 1 month ago (2010-11-18 14:20:15 UTC) #3
Nico
Makes sense. LG. Is there anything interesting that happens when the user is incognito? Should ...
10 years, 1 month ago (2010-11-18 14:34:24 UTC) #4
Mattias Nissler (ping if slow)
Here's another update. http://codereview.chromium.org/5174006/diff/6001/chrome/browser/policy/device_token_fetcher.cc File chrome/browser/policy/device_token_fetcher.cc (right): http://codereview.chromium.org/5174006/diff/6001/chrome/browser/policy/device_token_fetcher.cc#newcode38 chrome/browser/policy/device_token_fetcher.cc:38: if (!HasAuthToken()) { On 2010/11/18 14:34:24, ...
10 years, 1 month ago (2010-11-18 15:08:16 UTC) #5
Mattias Nissler (ping if slow)
On 2010/11/18 14:34:24, Nico wrote: > Makes sense. LG. > > Is there anything interesting ...
10 years, 1 month ago (2010-11-18 15:10:15 UTC) #6
markusheintz_
LGTM with comments addressed http://codereview.chromium.org/5174006/diff/27001/chrome/browser/policy/configuration_policy_pref_store.cc File chrome/browser/policy/configuration_policy_pref_store.cc (right): http://codereview.chromium.org/5174006/diff/27001/chrome/browser/policy/configuration_policy_pref_store.cc#newcode94 chrome/browser/policy/configuration_policy_pref_store.cc:94: return new DummyConfigurationPolicyProvider( Do you ...
10 years, 1 month ago (2010-11-18 15:42:33 UTC) #7
Mattias Nissler (ping if slow)
Answer's to Markus questions. No comment changes so far, please indicate whether you still want ...
10 years, 1 month ago (2010-11-18 16:06:37 UTC) #8
markusheintz_
http://codereview.chromium.org/5174006/diff/27001/chrome/browser/prefs/pref_value_store.h File chrome/browser/prefs/pref_value_store.h (right): http://codereview.chromium.org/5174006/diff/27001/chrome/browser/prefs/pref_value_store.h#newcode191 chrome/browser/prefs/pref_value_store.h:191: // state preferences. On 2010/11/18 16:06:38, Mattias Nissler wrote: ...
10 years, 1 month ago (2010-11-19 09:53:07 UTC) #9
Mattias Nissler (ping if slow)
I missed your comment, sorry. Will fix in a follow-up CL. On Fri, Nov 19, ...
10 years, 1 month ago (2010-11-19 10:49:38 UTC) #10
markusheintz_
If you address the other comments in your next CL Please also address these. THANKS!!!!!!! ...
10 years, 1 month ago (2010-11-19 11:00:45 UTC) #11
Mattias Nissler (ping if slow)
10 years, 1 month ago (2010-11-19 11:40:02 UTC) #12
Let's switch discussion to the other CL.

http://codereview.chromium.org/5174006/diff/27001/chrome/browser/policy/devic...
File chrome/browser/policy/device_token_fetcher.h (right):

http://codereview.chromium.org/5174006/diff/27001/chrome/browser/policy/devic...
chrome/browser/policy/device_token_fetcher.h:36: // testing. The fetcher uses
the directory in |token_dir| in which to store
On 2010/11/19 11:00:46, markusheintz_ wrote:
> I guess this should be token_path. Pls also address this if applicable.

Done.

http://codereview.chromium.org/5174006/diff/27001/chrome/browser/policy/devic...
chrome/browser/policy/device_token_fetcher.h:40: TokenService* token_service,
On 2010/11/19 11:00:46, markusheintz_ wrote:
> Please add an explaination for this parameter to the comment above.

Done.

Powered by Google App Engine
This is Rietveld 408576698