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

Issue 10693022: Add support for loading user cloud policy on desktop. (Closed)

Created:
8 years, 5 months ago by Andrew T Wilson (Slow)
Modified:
8 years, 4 months ago
CC:
chromium-reviews, oshima+watch_chromium.org, stevenjb+watch_chromium.org, nkostylev+watch_chromium.org, davemoore+watch_chromium.org
Visibility:
Public.

Description

Add support for loading user cloud policy on desktop, behind the --load-cloud-policy-on-signin flag. Move UserCloudPolicyManager to be owned by the Profile as a step towards supporting multiple profiles. Added TestingProfile::Builder as a start towards taming the madness of all the different constructors and setters. BUG=141123 TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=150380

Patch Set 1 #

Patch Set 2 : Now fetches oauth2 token to do DMToken registration. #

Patch Set 3 : Merge w/ToT #

Patch Set 4 : Worked around profile initialization ordering issues. #

Patch Set 5 : Working version with one new test. #

Patch Set 6 : Exclude test from cros, fix overzealous dcheck. #

Patch Set 7 : Checkpoint to debug win crash. #

Patch Set 8 : Got tests working. #

Patch Set 9 : Fix crash with AsyncPolicyProvider when created via unit tests. #

Patch Set 10 : Removed overzealous dcheck causing test failures. #

Patch Set 11 : Fix for android. #

Patch Set 12 : Handle calling BrowserPolicyConnector::Init() with no MessageLoop in tests. #

Patch Set 13 : Fixes for chromeos tests. #

Patch Set 14 : Fix compile error due to merge with ToT #

Patch Set 15 : More fixes for various cros test failures #

Patch Set 16 : Fix non-cros compilation error #

Patch Set 17 : Tweaked some comments after self-review. #

Total comments: 48

Patch Set 18 : Changes to address review feedback. #

Patch Set 19 : removed redundant #ifdef OS_CHROMEOS guard #

Total comments: 7
Unified diffs Side-by-side diffs Delta from patch set Stats (+1444 lines, -234 lines) Patch
M chrome/browser/browser_process_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/chromeos/login/login_utils.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +20 lines, -5 lines 2 comments Download
M chrome/browser/chromeos/login/login_utils_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/chromeos/login/policy_oauth_fetcher.cc View 1 2 3 4 2 chunks +14 lines, -0 lines 2 comments Download
M chrome/browser/policy/auto_enrollment_client.cc View 1 2 3 4 1 chunk +1 line, -4 lines 0 comments Download
M chrome/browser/policy/browser_policy_connector.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 4 chunks +14 lines, -2 lines 0 comments Download
M chrome/browser/policy/browser_policy_connector.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 13 chunks +118 lines, -91 lines 0 comments Download
M chrome/browser/policy/cloud_policy_client.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 chunks +6 lines, -3 lines 0 comments Download
M chrome/browser/policy/cloud_policy_provider.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +10 lines, -0 lines 0 comments Download
M chrome/browser/policy/cloud_policy_store.h View 1 2 2 chunks +8 lines, -0 lines 0 comments Download
M chrome/browser/policy/cloud_policy_subsystem.h View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/policy/cloud_policy_subsystem.cc View 1 2 3 4 1 chunk +2 lines, -7 lines 0 comments Download
M chrome/browser/policy/config_dir_policy_loader.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +9 lines, -0 lines 0 comments Download
M chrome/browser/policy/user_cloud_policy_manager.h View 1 2 3 4 5 6 2 chunks +20 lines, -10 lines 0 comments Download
M chrome/browser/policy/user_cloud_policy_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +17 lines, -16 lines 0 comments Download
A chrome/browser/policy/user_cloud_policy_store.h View 1 2 3 4 1 chunk +52 lines, -0 lines 0 comments Download
A chrome/browser/policy/user_cloud_policy_store.cc View 1 2 3 4 1 chunk +79 lines, -0 lines 0 comments Download
A chrome/browser/policy/user_cloud_policy_store_base.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +42 lines, -0 lines 0 comments Download
A chrome/browser/policy/user_cloud_policy_store_base.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +44 lines, -0 lines 0 comments Download
M chrome/browser/policy/user_cloud_policy_store_chromeos.h View 1 2 3 4 3 chunks +2 lines, -7 lines 0 comments Download
M chrome/browser/policy/user_cloud_policy_store_chromeos.cc View 1 2 3 4 5 chunks +41 lines, -24 lines 0 comments Download
A chrome/browser/policy/user_cloud_policy_store_unittest.cc View 1 2 3 4 5 6 1 chunk +133 lines, -0 lines 0 comments Download
A chrome/browser/policy/user_policy_signin_service.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +73 lines, -0 lines 0 comments Download
A chrome/browser/policy/user_policy_signin_service.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +177 lines, -0 lines 0 comments Download
A chrome/browser/policy/user_policy_signin_service_factory.h View 1 2 3 4 5 6 1 chunk +48 lines, -0 lines 0 comments Download
A chrome/browser/policy/user_policy_signin_service_factory.cc View 1 2 3 4 5 6 1 chunk +56 lines, -0 lines 0 comments Download
A chrome/browser/policy/user_policy_signin_service_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +161 lines, -0 lines 0 comments Download
M chrome/browser/prefs/command_line_pref_store.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/prefs/pref_member.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/profiles/off_the_record_profile_impl.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/profiles/off_the_record_profile_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/profiles/profile.h View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +6 lines, -1 line 0 comments Download
M chrome/browser/profiles/profile_dependency_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/profiles/profile_impl.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +7 lines, -3 lines 0 comments Download
M chrome/browser/profiles/profile_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +15 lines, -3 lines 0 comments Download
M chrome/browser/profiles/profile_io_data.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/signin/signin_manager.h View 1 2 3 4 5 6 7 2 chunks +5 lines, -2 lines 0 comments Download
M chrome/browser/signin/signin_manager_fake.h View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/signin/signin_manager_fake.cc View 1 2 3 4 5 6 7 2 chunks +11 lines, -2 lines 0 comments Download
M chrome/browser/sync/profile_sync_service_mock.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +2 lines, -9 lines 0 comments Download
M chrome/browser/sync/sync_ui_util_unittest.cc View 1 2 3 4 5 6 7 3 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/ui/sync/one_click_signin_helper_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/ui/webui/sync_setup_handler_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +2 lines, -3 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +14 lines, -0 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/common/chrome_switches.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/chrome_switches.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/common/pref_names.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/pref_names.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/test/base/testing_browser_process.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +18 lines, -6 lines 0 comments Download
M chrome/test/base/testing_profile.h View 1 2 3 4 5 6 7 8 9 10 11 5 chunks +64 lines, -0 lines 3 comments Download
M chrome/test/base/testing_profile.cc View 1 2 3 4 5 6 7 8 9 10 11 12 5 chunks +112 lines, -24 lines 0 comments Download

Messages

Total messages: 18 (0 generated)
Andrew T Wilson (Slow)
Mattias, PTAL at stuff under policy/ and chromeos/ (feel free to look at the changes ...
8 years, 4 months ago (2012-08-02 21:43:17 UTC) #1
Mattias Nissler (ping if slow)
Looks pretty good in general, the only two items I'm a bit unhappy about are ...
8 years, 4 months ago (2012-08-03 12:19:08 UTC) #2
Andrew T Wilson (Slow)
On 2012/08/03 12:19:08, Mattias Nissler wrote: > Looks pretty good in general, the only two ...
8 years, 4 months ago (2012-08-03 20:57:34 UTC) #3
Andrew T Wilson (Slow)
Anyhow, as to how many tests - basically every test that uses a ProfileImpl instead ...
8 years, 4 months ago (2012-08-04 00:33:26 UTC) #4
Andrew T Wilson (Slow)
Thanks for looking at this so quickly. http://codereview.chromium.org/10693022/diff/52055/chrome/browser/policy/browser_policy_connector.cc File chrome/browser/policy/browser_policy_connector.cc (right): http://codereview.chromium.org/10693022/diff/52055/chrome/browser/policy/browser_policy_connector.cc#newcode132 chrome/browser/policy/browser_policy_connector.cc:132: // AsyncPlatformLoader ...
8 years, 4 months ago (2012-08-04 00:54:41 UTC) #5
Mattias Nissler (ping if slow)
Regarding the tests vs. BPC::Init() vs. threading discussion: Previously, we'd just not run any policy ...
8 years, 4 months ago (2012-08-06 08:33:52 UTC) #6
Andrew T Wilson (Slow)
erg: PTAL browser/profiles + testing_profile.* sky: PTAL chrome/ and chrome/test jhawkins: PTAL chrome/browser/ui/webui nkostylev: PTAL ...
8 years, 4 months ago (2012-08-06 20:30:23 UTC) #7
James Hawkins
webui LGTM
8 years, 4 months ago (2012-08-06 21:17:51 UTC) #8
Elliot Glaysher
lgtm I guess.
8 years, 4 months ago (2012-08-06 22:22:09 UTC) #9
sky
http://codereview.chromium.org/10693022/diff/46070/chrome/test/base/testing_profile.h File chrome/test/base/testing_profile.h (right): http://codereview.chromium.org/10693022/diff/46070/chrome/test/base/testing_profile.h#newcode124 chrome/test/base/testing_profile.h:124: TestingProfile(const FilePath& path, We already have so many constructors ...
8 years, 4 months ago (2012-08-06 22:28:27 UTC) #10
Andrew T Wilson (Slow)
http://codereview.chromium.org/10693022/diff/46070/chrome/test/base/testing_profile.h File chrome/test/base/testing_profile.h (right): http://codereview.chromium.org/10693022/diff/46070/chrome/test/base/testing_profile.h#newcode124 chrome/test/base/testing_profile.h:124: TestingProfile(const FilePath& path, On 2012/08/06 22:28:27, sky wrote: > ...
8 years, 4 months ago (2012-08-06 23:12:25 UTC) #11
Andrew T Wilson (Slow)
sky: let me know if this does not address your concerns. http://codereview.chromium.org/10693022/diff/46070/chrome/test/base/testing_profile.h File chrome/test/base/testing_profile.h (right): ...
8 years, 4 months ago (2012-08-06 23:59:14 UTC) #12
sky
TODO sg, LGTM
8 years, 4 months ago (2012-08-07 00:55:43 UTC) #13
Nikita (slow)
http://codereview.chromium.org/10693022/diff/46070/chrome/browser/chromeos/login/login_utils.cc File chrome/browser/chromeos/login/login_utils.cc (right): http://codereview.chromium.org/10693022/diff/46070/chrome/browser/chromeos/login/login_utils.cc#newcode500 chrome/browser/chromeos/login/login_utils.cc:500: Profile* user_profile = ProfileManager::GetDefaultProfile(); Please make sure that you're ...
8 years, 4 months ago (2012-08-07 16:35:09 UTC) #14
Andrew T Wilson (Slow)
http://codereview.chromium.org/10693022/diff/46070/chrome/browser/chromeos/login/login_utils.cc File chrome/browser/chromeos/login/login_utils.cc (right): http://codereview.chromium.org/10693022/diff/46070/chrome/browser/chromeos/login/login_utils.cc#newcode500 chrome/browser/chromeos/login/login_utils.cc:500: Profile* user_profile = ProfileManager::GetDefaultProfile(); On 2012/08/07 16:35:09, Nikita Kostylev ...
8 years, 4 months ago (2012-08-07 16:55:44 UTC) #15
Nikita (slow)
That's right, thanks for confirming. lgtm On 2012/08/07 16:55:44, Andrew T Wilson wrote: > http://codereview.chromium.org/10693022/diff/46070/chrome/browser/chromeos/login/login_utils.cc ...
8 years, 4 months ago (2012-08-07 17:03:58 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/atwilson@chromium.org/10693022/46070
8 years, 4 months ago (2012-08-07 17:06:33 UTC) #17
commit-bot: I haz the power
8 years, 4 months ago (2012-08-07 18:50:10 UTC) #18
Change committed as 150380

Powered by Google App Engine
This is Rietveld 408576698