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

Issue 7298012: Consolidate data storage and notifications in the cloud policy subsystem (Closed)

Created:
9 years, 5 months ago by gfeher
Modified:
9 years, 5 months ago
CC:
chromium-reviews, Paweł Hajdan Jr., Mattias Nissler (ping if slow)
Visibility:
Public.

Description

Consolidate data storage and notifications in the cloud policy subsystem Get rid of identity strategies and create a central in-memory data store and notification hub, which is more simple. It's called CloudPolicyDataStore. BUG=chromium-os:17309 TEST=user and device policies work exactly as before Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=91957

Patch Set 1 : " #

Total comments: 118

Patch Set 2 : address comments #

Patch Set 3 : address comments + tweaks #

Total comments: 10

Patch Set 4 : addressed comments #

Patch Set 5 : fix failures #

Patch Set 6 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+590 lines, -957 lines) Patch
M chrome/browser/policy/browser_policy_connector.h View 1 2 3 chunks +6 lines, -7 lines 0 comments Download
M chrome/browser/policy/browser_policy_connector.cc View 1 2 3 10 chunks +29 lines, -24 lines 0 comments Download
M chrome/browser/policy/cloud_policy_controller.h View 1 2 3 6 chunks +13 lines, -23 lines 0 comments Download
M chrome/browser/policy/cloud_policy_controller.cc View 1 2 3 4 5 9 chunks +45 lines, -42 lines 0 comments Download
M chrome/browser/policy/cloud_policy_controller_unittest.cc View 1 2 12 chunks +29 lines, -100 lines 0 comments Download
A chrome/browser/policy/cloud_policy_data_store.h View 1 2 3 1 chunk +126 lines, -0 lines 0 comments Download
A chrome/browser/policy/cloud_policy_data_store.cc View 1 2 3 4 5 1 chunk +177 lines, -0 lines 0 comments Download
D chrome/browser/policy/cloud_policy_identity_strategy.h View 1 1 chunk +0 lines, -93 lines 0 comments Download
D chrome/browser/policy/cloud_policy_identity_strategy.cc View 1 1 chunk +0 lines, -29 lines 0 comments Download
M chrome/browser/policy/cloud_policy_subsystem.h View 1 2 4 chunks +4 lines, -5 lines 0 comments Download
M chrome/browser/policy/cloud_policy_subsystem.cc View 1 2 8 chunks +9 lines, -10 lines 0 comments Download
M chrome/browser/policy/cloud_policy_subsystem_unittest.cc View 1 2 7 chunks +11 lines, -65 lines 0 comments Download
M chrome/browser/policy/delayed_work_scheduler.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/policy/device_policy_cache.h View 1 2 3 5 chunks +4 lines, -6 lines 0 comments Download
M chrome/browser/policy/device_policy_cache.cc View 1 2 3 4 5 7 chunks +17 lines, -12 lines 0 comments Download
M chrome/browser/policy/device_policy_cache_unittest.cc View 1 2 3 4 3 chunks +4 lines, -3 lines 0 comments Download
D chrome/browser/policy/device_policy_identity_strategy.h View 1 chunk +0 lines, -74 lines 0 comments Download
D chrome/browser/policy/device_policy_identity_strategy.cc View 1 chunk +0 lines, -105 lines 0 comments Download
M chrome/browser/policy/device_token_fetcher.h View 1 2 5 chunks +8 lines, -39 lines 0 comments Download
M chrome/browser/policy/device_token_fetcher.cc View 1 2 3 4 5 8 chunks +18 lines, -44 lines 0 comments Download
M chrome/browser/policy/device_token_fetcher_unittest.cc View 1 2 6 chunks +39 lines, -46 lines 0 comments Download
M chrome/browser/policy/logging_work_scheduler.cc View 1 2 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/browser/policy/testing_cloud_policy_subsystem.h View 1 2 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/policy/testing_cloud_policy_subsystem.cc View 1 2 2 chunks +4 lines, -3 lines 0 comments Download
D chrome/browser/policy/user_policy_identity_strategy.h View 1 chunk +0 lines, -88 lines 0 comments Download
D chrome/browser/policy/user_policy_identity_strategy.cc View 1 chunk +0 lines, -107 lines 0 comments Download
M chrome/browser/policy/user_policy_token_cache.h View 1 2 3 chunks +11 lines, -13 lines 0 comments Download
M chrome/browser/policy/user_policy_token_cache.cc View 1 2 3 4 5 5 chunks +28 lines, -7 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 4 chunks +2 lines, -8 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
gfeher
Hi, please start reviewing my amazing change. Please feel free to ask any questions, on-line ...
9 years, 5 months ago (2011-07-06 09:47:48 UTC) #1
pastarmovj
Mostly minor comments. Looks pretty good! http://codereview.chromium.org/7298012/diff/11001/chrome/browser/policy/cloud_policy_controller.cc File chrome/browser/policy/cloud_policy_controller.cc (right): http://codereview.chromium.org/7298012/diff/11001/chrome/browser/policy/cloud_policy_controller.cc#newcode17 chrome/browser/policy/cloud_policy_controller.cc:17: #include "chrome/browser/policy/device_management_backend.h" What ...
9 years, 5 months ago (2011-07-06 12:11:57 UTC) #2
gfeher
http://codereview.chromium.org/7298012/diff/11001/chrome/browser/policy/cloud_policy_controller.cc File chrome/browser/policy/cloud_policy_controller.cc (right): http://codereview.chromium.org/7298012/diff/11001/chrome/browser/policy/cloud_policy_controller.cc#newcode17 chrome/browser/policy/cloud_policy_controller.cc:17: #include "chrome/browser/policy/device_management_backend.h" Do it only at one place... http://codereview.chromium.org/7298012/diff/11001/chrome/browser/policy/cloud_policy_controller.h ...
9 years, 5 months ago (2011-07-06 15:14:20 UTC) #3
pastarmovj
LGTM. http://codereview.chromium.org/7298012/diff/11001/chrome/browser/policy/cloud_policy_subsystem_unittest.cc File chrome/browser/policy/cloud_policy_subsystem_unittest.cc (right): http://codereview.chromium.org/7298012/diff/11001/chrome/browser/policy/cloud_policy_subsystem_unittest.cc#newcode302 chrome/browser/policy/cloud_policy_subsystem_unittest.cc:302: CombinedTestDesc(403, 400), My only reasoning is that these ...
9 years, 5 months ago (2011-07-06 15:36:01 UTC) #4
Joao da Silva
LGTM! I have some issue with unnecessary headers, please fix them :-) A test for ...
9 years, 5 months ago (2011-07-06 16:45:14 UTC) #5
gfeher
Woo-hoo, thanks for the comments! I was not sure if there's enough functionality in CloudPolicyData ...
9 years, 5 months ago (2011-07-07 13:51:00 UTC) #6
Joao da Silva
Still LGTM! Have a look at the comments below before committing. http://codereview.chromium.org/7298012/diff/11001/chrome/browser/policy/cloud_policy_controller.cc File chrome/browser/policy/cloud_policy_controller.cc (right): ...
9 years, 5 months ago (2011-07-07 16:54:16 UTC) #7
gfeher
9 years, 5 months ago (2011-07-08 09:19:14 UTC) #8
http://codereview.chromium.org/7298012/diff/11001/chrome/browser/policy/cloud...
File chrome/browser/policy/cloud_policy_controller.cc (right):

http://codereview.chromium.org/7298012/diff/11001/chrome/browser/policy/cloud...
chrome/browser/policy/cloud_policy_controller.cc:24: static const char*
kNonManagedDomains[] = {
On 2011/07/07 16:54:16, Joao da Silva wrote:
> On 2011/07/07 13:51:00, gfeher wrote:
> > On 2011/07/06 16:45:14, Joao da Silva wrote:
> > > Should this static var be in the anonymous namespace instead?
> > 
> > Agreed.
> Cool. In that case the static qualifier can be dropped.

Done.

http://codereview.chromium.org/7298012/diff/11001/chrome/browser/policy/cloud...
File chrome/browser/policy/cloud_policy_controller.h (right):

http://codereview.chromium.org/7298012/diff/11001/chrome/browser/policy/cloud...
chrome/browser/policy/cloud_policy_controller.h:15: #include "base/time.h"
Sorry. Done.

http://codereview.chromium.org/7298012/diff/11001/chrome/browser/policy/devic...
File chrome/browser/policy/device_token_fetcher.cc (right):

http://codereview.chromium.org/7298012/diff/11001/chrome/browser/policy/devic...
chrome/browser/policy/device_token_fetcher.cc:11: #include "base/message_loop.h"
On 2011/07/07 16:54:16, Joao da Silva wrote:
> On 2011/07/06 16:45:14, Joao da Silva wrote:
> > Nit: callback.h and message_loop.h not used
> These seem still not used, am I missing something?

Nope. I was missing something.

http://codereview.chromium.org/7298012/diff/12033/chrome/browser/policy/cloud...
File chrome/browser/policy/cloud_policy_data_store.cc (right):

http://codereview.chromium.org/7298012/diff/12033/chrome/browser/policy/cloud...
chrome/browser/policy/cloud_policy_data_store.cc:8: #include
"base/string_util.h"
On 2011/07/07 16:54:16, Joao da Silva wrote:
> Nit: string_util.h not used

Done.

http://codereview.chromium.org/7298012/diff/12033/chrome/browser/policy/cloud...
chrome/browser/policy/cloud_policy_data_store.cc:15: #include
"chrome/browser/chromeos/login/user_manager.h"
On 2011/07/07 16:54:16, Joao da Silva wrote:
> Nit: cros_library.h, ownership_service.h and user_manager.h not used

Done.

http://codereview.chromium.org/7298012/diff/12033/chrome/browser/policy/cloud...
chrome/browser/policy/cloud_policy_data_store.cc:22: static const char
kMachineInfoSystemHwqual[] = "hardware_class";
On 2011/07/07 16:54:16, Joao da Silva wrote:
> Is static needed inside the anonymous namespace?

Done.

http://codereview.chromium.org/7298012/diff/12033/chrome/browser/policy/cloud...
chrome/browser/policy/cloud_policy_data_store.cc:29: namespace em =
enterprise_management;
It's done in other .h files as well. I guess the only problem is that files
including the .h file also get this definition, even if they don't need it. I
tried to move it to an anonymous namespace but then it conflicted with "em"
definitions from other .h files. So I leave it there for now, and I am not sure
if there's a better solution.

http://codereview.chromium.org/7298012/diff/12033/chrome/browser/policy/cloud...
File chrome/browser/policy/cloud_policy_data_store.h (right):

http://codereview.chromium.org/7298012/diff/12033/chrome/browser/policy/cloud...
chrome/browser/policy/cloud_policy_data_store.h:12: #include
"base/memory/weak_ptr.h"
On 2011/07/07 16:54:16, Joao da Silva wrote:
> Nit: alphabetic order

Done.

Powered by Google App Engine
This is Rietveld 408576698