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

Issue 12088040: Add a SigninAllowed policy. (Closed)

Created:
7 years, 10 months ago by Adrian Kuegel
Modified:
7 years, 9 months ago
CC:
chromium-reviews, dbeam+watch-options_chromium.org, dbeam+watch-ntp_chromium.org, arv (Not doing code reviews), pam+watch_chromium.org, estade+watch_chromium.org, pedrosimonetti+watch_chromium.org
Visibility:
Public.

Description

Add a signin allowed policy which is used to determine if a user is allowed to sign in to Chrome. This will be used for example for one preference for managed user settings. BUG=171370 TEST=unit_tests, browser_tests, manual Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=185359

Patch Set 1 #

Patch Set 2 : Use the IsSyncAccessible method to propagate the settings. #

Total comments: 2

Patch Set 3 : Add a signin allowed policy. #

Patch Set 4 : Some bugfixes. #

Total comments: 19

Patch Set 5 : Adress review comments, start with unit tests. #

Patch Set 6 : Fix problem with new unit test for BrowserCommandController. #

Patch Set 7 : Add tests and link UpdateLogin to kSigninAllowed pref. #

Total comments: 8

Patch Set 8 : Rebase to ToT, another try to upload. #

Total comments: 5

Patch Set 9 : Fix bug with policy. #

Patch Set 10 : Fix problem with signin_tracker_unittest. #

Patch Set 11 : Extract managed user specific stuff into another changelist. #

Total comments: 27

Patch Set 12 : Address review comments and rebase to ToT. #

Patch Set 13 : Fix compile errors on mac. #

Patch Set 14 : Rebase to ToT. #

Patch Set 15 : Fix indentation issues. #

Total comments: 6

Patch Set 16 : Address review comments and rebase to ToT. #

Total comments: 2

Patch Set 17 : Address nits and rebase to ToT. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+341 lines, -28 lines) Patch
M chrome/app/policy/policy_templates.json View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +17 lines, -1 line 0 comments Download
M chrome/browser/app_controller_mac.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +6 lines, -1 line 0 comments Download
M chrome/browser/policy/configuration_policy_handler_list.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +3 lines, -0 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 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/profiles/profile_io_data.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +5 lines, -0 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 13 14 15 2 chunks +4 lines, -0 lines 0 comments Download
M chrome/browser/signin/signin_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 5 chunks +15 lines, -0 lines 0 comments Download
M chrome/browser/signin/signin_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 5 chunks +20 lines, -1 line 0 comments Download
M chrome/browser/signin/signin_manager_fake.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +7 lines, -0 lines 0 comments Download
M chrome/browser/ui/browser_command_controller.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 chunks +8 lines, -1 line 0 comments Download
M chrome/browser/ui/browser_command_controller.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 5 chunks +21 lines, -1 line 0 comments Download
M chrome/browser/ui/browser_command_controller_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +52 lines, -0 lines 0 comments Download
M chrome/browser/ui/chrome_pages.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/sync/one_click_signin_helper.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 chunks +8 lines, -2 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 3 chunks +26 lines, -0 lines 0 comments Download
M chrome/browser/ui/toolbar/wrench_menu_model.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +11 lines, -5 lines 0 comments Download
M chrome/browser/ui/webui/ntp/new_tab_page_sync_handler.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +11 lines, -2 lines 0 comments Download
M chrome/browser/ui/webui/ntp/new_tab_page_sync_handler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 4 chunks +18 lines, -3 lines 0 comments Download
A chrome/browser/ui/webui/ntp/new_tab_page_sync_handler_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +45 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/ntp/ntp_login_handler.h View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/webui/ntp/ntp_login_handler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 chunks +8 lines, -1 line 0 comments Download
M chrome/browser/ui/webui/options/browser_options_handler.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +4 lines, -3 lines 0 comments Download
M chrome/browser/ui/webui/options/browser_options_handler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 4 chunks +20 lines, -6 lines 0 comments Download
M chrome/browser/ui/webui/sync_promo/sync_promo_ui.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -1 line 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/pref_names.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 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 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/test/base/testing_profile.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/test/base/testing_profile.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 6 chunks +10 lines, -0 lines 0 comments Download
M chrome/test/data/policy/policy_test_cases.json View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +8 lines, -0 lines 0 comments Download

Messages

Total messages: 48 (0 generated)
Adrian Kuegel
I added code for the "no signin" preference. Can you please take a look if ...
7 years, 10 months ago (2013-01-29 13:41:53 UTC) #1
Pam (message me for reviews)
Unfortunately, it's a little more complicated than this. Signing in controls more than just sync, ...
7 years, 10 months ago (2013-01-30 10:03:40 UTC) #2
Andrew T Wilson (Slow)
One additional point - do you need to make sure that users get signed out ...
7 years, 10 months ago (2013-01-30 10:30:33 UTC) #3
Adrian Kuegel
On 2013/01/30 10:30:33, Andrew T Wilson wrote: > One additional point - do you need ...
7 years, 10 months ago (2013-01-30 10:34:21 UTC) #4
Pam (message me for reviews)
On 2013/01/30 10:34:21, Adrian Kuegel wrote: > On 2013/01/30 10:30:33, Andrew T Wilson wrote: > ...
7 years, 10 months ago (2013-01-30 10:36:15 UTC) #5
Andrew T Wilson (Slow)
On 2013/01/30 10:36:15, Pam wrote: > Do you think we should put this in as ...
7 years, 10 months ago (2013-01-30 10:51:45 UTC) #6
Adrian Kuegel
I uploaded a new patch. Automatic tests are still TODO, but I tested manually and ...
7 years, 10 months ago (2013-02-04 15:03:57 UTC) #7
Andrew T Wilson (Slow)
Overall looks pretty good. I had a few concerns here and there. The biggest question ...
7 years, 10 months ago (2013-02-04 15:41:48 UTC) #8
Andrew T Wilson (Slow)
https://codereview.chromium.org/12088040/diff/17001/chrome/browser/ui/webui/options/browser_options_handler.cc File chrome/browser/ui/webui/options/browser_options_handler.cc (right): https://codereview.chromium.org/12088040/diff/17001/chrome/browser/ui/webui/options/browser_options_handler.cc#newcode1081 chrome/browser/ui/webui/options/browser_options_handler.cc:1081: !!service && (!signin || signin->IsSigninAllowed())); On 2013/02/04 15:41:48, Andrew ...
7 years, 10 months ago (2013-02-05 08:58:53 UTC) #9
Adrian Kuegel
I uploaded a new patch which hopefully adresses the review comments. https://codereview.chromium.org/12088040/diff/17001/chrome/app/generated_resources.grd File chrome/app/generated_resources.grd (right): ...
7 years, 10 months ago (2013-02-05 10:55:15 UTC) #10
Adrian Kuegel
I added some tests and fixed a few more issues. Can you please take another ...
7 years, 10 months ago (2013-02-06 16:07:33 UTC) #11
Andrew T Wilson (Slow)
Very close after addressing comments below - can you sync with ToT and re-upload? I'd ...
7 years, 10 months ago (2013-02-07 10:08:11 UTC) #12
Adrian Kuegel
I rebased to ToT, and fixed the issues you mentioned. Patch number 8 can be ...
7 years, 10 months ago (2013-02-07 11:09:20 UTC) #13
Adrian Kuegel
@Joao: can you please take a look at the files of this changelist in chrome/browser/policy ...
7 years, 10 months ago (2013-02-07 15:01:35 UTC) #14
Andrew T Wilson (Slow)
LGTM with one nit. https://codereview.chromium.org/12088040/diff/43002/chrome/browser/ui/webui/options/browser_options_handler.cc File chrome/browser/ui/webui/options/browser_options_handler.cc (right): https://codereview.chromium.org/12088040/diff/43002/chrome/browser/ui/webui/options/browser_options_handler.cc#newcode667 chrome/browser/ui/webui/options/browser_options_handler.cc:667: base::Bind(&BrowserOptionsHandler::SetupProxySettingsSection, Indent is off here ...
7 years, 10 months ago (2013-02-07 15:05:30 UTC) #15
Joao da Silva
https://codereview.chromium.org/12088040/diff/43002/chrome/browser/policy/configuration_policy_handler.h File chrome/browser/policy/configuration_policy_handler.h (right): https://codereview.chromium.org/12088040/diff/43002/chrome/browser/policy/configuration_policy_handler.h#newcode225 chrome/browser/policy/configuration_policy_handler.h:225: class SigninPolicyHandler: public TypeCheckingPolicyHandler { This class isn't ever ...
7 years, 10 months ago (2013-02-07 15:36:36 UTC) #16
Andrew T Wilson (Slow)
Joao - so why do we have a special class for the SyncDisabled policy? Shouldn't ...
7 years, 10 months ago (2013-02-07 15:51:02 UTC) #17
Joao da Silva
On 2013/02/07 15:51:02, Andrew T Wilson wrote: > Joao - so why do we have ...
7 years, 10 months ago (2013-02-07 16:03:43 UTC) #18
Adrian Kuegel
I just uploaded a new patch which addresses your comments. I also found that I ...
7 years, 10 months ago (2013-02-07 16:08:59 UTC) #19
Joao da Silva
https://codereview.chromium.org/12088040/diff/43002/chrome/browser/policy/configuration_policy_handler.h File chrome/browser/policy/configuration_policy_handler.h (right): https://codereview.chromium.org/12088040/diff/43002/chrome/browser/policy/configuration_policy_handler.h#newcode225 chrome/browser/policy/configuration_policy_handler.h:225: class SigninPolicyHandler: public TypeCheckingPolicyHandler { On 2013/02/07 16:08:59, Adrian ...
7 years, 10 months ago (2013-02-07 16:13:05 UTC) #20
Adrian Kuegel
There was an error when I uploaded the patch. It seems I should not do ...
7 years, 10 months ago (2013-02-07 16:16:28 UTC) #21
Joao da Silva
policy/ lgtm I'd ask for a new policy_browsertest, but new_tab_page_sync_handler_browsertest.cc already covers that.
7 years, 10 months ago (2013-02-07 16:25:53 UTC) #22
Adrian Kuegel
@Scott: can you please look at chrome/browser/app_controller_mac.mm and chrome/chrome_tests.gypi and the files in chrome/test/base, chrome/common, ...
7 years, 10 months ago (2013-02-08 10:23:37 UTC) #23
Adrian Kuegel
@Scott: can you please look at chrome/browser/app_controller_mac.mm and chrome/chrome_tests.gypi and the files in chrome/test/base, chrome/common, ...
7 years, 10 months ago (2013-02-08 10:24:19 UTC) #24
csilv
chrome/browser/ui/webui/options lgtm
7 years, 10 months ago (2013-02-08 18:31:10 UTC) #25
sail
https://codereview.chromium.org/12088040/diff/38008/chrome/browser/profiles/gaia_info_update_service.cc File chrome/browser/profiles/gaia_info_update_service.cc (right): https://codereview.chromium.org/12088040/diff/38008/chrome/browser/profiles/gaia_info_update_service.cc#newcode68 chrome/browser/profiles/gaia_info_update_service.cc:68: !profile->GetOriginalProfile()->IsSigninAllowed()) Why this change? https://codereview.chromium.org/12088040/diff/38008/chrome/browser/profiles/profile.h File chrome/browser/profiles/profile.h (right): https://codereview.chromium.org/12088040/diff/38008/chrome/browser/profiles/profile.h#newcode356 ...
7 years, 10 months ago (2013-02-08 20:18:57 UTC) #26
Andrew T Wilson (Slow)
https://codereview.chromium.org/12088040/diff/38008/chrome/browser/signin/signin_tracker.cc File chrome/browser/signin/signin_tracker.cc (right): https://codereview.chromium.org/12088040/diff/38008/chrome/browser/signin/signin_tracker.cc#newcode138 chrome/browser/signin/signin_tracker.cc:138: !signin->IsSigninAllowed()) { On 2013/02/08 20:18:57, sail wrote: > This ...
7 years, 10 months ago (2013-02-08 20:33:11 UTC) #27
sail
> Because signin isn't allowed, so signin should fail? This kind of logic is super ...
7 years, 10 months ago (2013-02-08 20:34:59 UTC) #28
Andrew T Wilson (Slow)
On 2013/02/08 20:34:59, sail wrote: > > Because signin isn't allowed, so signin should fail? ...
7 years, 10 months ago (2013-02-08 20:51:47 UTC) #29
Andrew T Wilson (Slow)
That said, I think it's reasonable to change some of the purely-defensive checks for IsSIgninAllowed() ...
7 years, 10 months ago (2013-02-08 20:53:40 UTC) #30
sail
On 2013/02/08 20:53:40, Andrew T Wilson wrote: > That said, I think it's reasonable to ...
7 years, 10 months ago (2013-02-08 21:00:47 UTC) #31
Andrew T Wilson (Slow)
On 2013/02/08 21:00:47, sail wrote: > On 2013/02/08 20:53:40, Andrew T Wilson wrote: > > ...
7 years, 10 months ago (2013-02-08 21:07:22 UTC) #32
Adrian Kuegel
@sail: Thanks for the review. Sorry that I did not respond earlier, it is already ...
7 years, 10 months ago (2013-02-08 23:17:55 UTC) #33
Adrian Kuegel
https://codereview.chromium.org/12088040/diff/38008/chrome/browser/profiles/gaia_info_update_service.cc File chrome/browser/profiles/gaia_info_update_service.cc (right): https://codereview.chromium.org/12088040/diff/38008/chrome/browser/profiles/gaia_info_update_service.cc#newcode68 chrome/browser/profiles/gaia_info_update_service.cc:68: !profile->GetOriginalProfile()->IsSigninAllowed()) I thought that "No Signin" should imply "No ...
7 years, 10 months ago (2013-02-11 16:47:30 UTC) #34
Adrian Kuegel
Could I please get another review, so that I know what I still need to ...
7 years, 10 months ago (2013-02-15 15:53:52 UTC) #35
Adrian Kuegel
Another ping.
7 years, 10 months ago (2013-02-20 22:16:17 UTC) #36
sky
When you have multiple reviewers and you ping please specify who you are waiting on. ...
7 years, 10 months ago (2013-02-20 22:52:43 UTC) #37
sail
Not sure how I missed the previous ping. Sorry about that. This CL looks good. ...
7 years, 10 months ago (2013-02-20 23:08:21 UTC) #38
Adrian Kuegel
@Sail: thanks for the review, and I will ask willchan to review the profileio files. ...
7 years, 10 months ago (2013-02-21 15:48:59 UTC) #39
Adrian Kuegel
@willchan: could you please review the profile_io files? @Scott: can you please review chrome/browser/app_controller_mac.mm and ...
7 years, 10 months ago (2013-02-21 15:54:47 UTC) #40
willchan no longer on Chromium
lgtm
7 years, 10 months ago (2013-02-21 16:02:47 UTC) #41
sky
LGTM
7 years, 10 months ago (2013-02-21 20:18:44 UTC) #42
Adrian Kuegel
@Dan: can you please take a look at the files in chrome/browser/ui/webui/ntp and chrome/browser/ui/webui/sync_promo ? ...
7 years, 10 months ago (2013-02-25 16:28:07 UTC) #43
Dan Beam
lgtm but please address nits https://codereview.chromium.org/12088040/diff/64001/chrome/browser/ui/webui/ntp/new_tab_page_sync_handler.cc File chrome/browser/ui/webui/ntp/new_tab_page_sync_handler.cc (right): https://codereview.chromium.org/12088040/diff/64001/chrome/browser/ui/webui/ntp/new_tab_page_sync_handler.cc#newcode49 chrome/browser/ui/webui/ntp/new_tab_page_sync_handler.cc:49: profile_pref_registrar_.RemoveAll(); probably isn't necessary. ...
7 years, 10 months ago (2013-02-25 17:35:07 UTC) #44
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/akuegel@chromium.org/12088040/71001
7 years, 9 months ago (2013-02-28 16:11:01 UTC) #45
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) net_unittests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&number=116715
7 years, 9 months ago (2013-02-28 17:36:01 UTC) #46
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/akuegel@chromium.org/12088040/71001
7 years, 9 months ago (2013-02-28 21:12:24 UTC) #47
commit-bot: I haz the power
7 years, 9 months ago (2013-02-28 23:14:21 UTC) #48
Message was sent while issue was closed.
Change committed as 185359

Powered by Google App Engine
This is Rietveld 408576698