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

Issue 745613002: [cros] Cleanup: remove LoginUtils (Closed)

Created:
6 years, 1 month ago by Nikita (slow)
Modified:
5 years, 10 months ago
CC:
chromium-reviews, stevenjb+watch_chromium.org, davemoore+watch_chromium.org, oshima+watch_chromium.org, nkostylev+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[cros] Cleanup: remove LoginUtils Introduced UserSessionManagerTestApi: * InjectStubUserContext() to configure predefined user credentials (StubAuthenticator) * SetShouldLaunchBrowserInTests() to control whether browser instance should be created in tests. Some tests don't really need that and were not designed to handle it properly. LoginUtils methods: * IsWhitelisted() is moved to CrosSettings * CreateAuthenticator() is moved to UserSessionManager * PrepareProfile() and DoBrowserLaunch() were already just a thin wrappers around corresponding methods of UserSessionManager. Tests changes: * MockAuthenticator > StubAuthenticator * Now tests that were using MockLoginUtils to inject their own test profile are using regular profile init code with a stub user_context. BUG=435094 TBR=stevenjb@chromium.org Committed: https://crrev.com/393309fdf609591e8b3225728992011b0c772cfa Cr-Commit-Position: refs/heads/master@{#314798}

Patch Set 1 : unit_tests #

Patch Set 2 : Get rid of MockLoginUtils in ExistingUserController*Test #

Patch Set 3 : dep #

Patch Set 4 : fix tests #

Patch Set 5 : rebase #

Patch Set 6 : fix tests debug logs #

Patch Set 7 : fix more tests #

Patch Set 8 : Get rid of MockLoginUtils usage in LoginManagerTest #

Patch Set 9 : rebase #

Patch Set 10 : cleanup #

Patch Set 11 : fix gn build #

Patch Set 12 : fix gn build #

Patch Set 13 : remove mock/fake, add gn deps #

Patch Set 14 : remove login_utils #

Patch Set 15 : rebase #

Patch Set 16 : fix kiosk_profile_loader #

Patch Set 17 : fix all tests #

Patch Set 18 : test API + cleanup logging #

Patch Set 19 : move test API class to proper test target #

Patch Set 20 : fix gn build #

Total comments: 2

Patch Set 21 : rebase #

Patch Set 22 : refactor CL #

Patch Set 23 : rebase #

Patch Set 24 : fix test #

Patch Set 25 : get rid of FakeChromeUserManager usage in ExistingUserController* tests #

Unified diffs Side-by-side diffs Delta from patch set Stats (+416 lines, -923 lines) Patch
M chrome/browser/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +2 lines, -4 lines 0 comments Download
M chrome/browser/chromeos/accessibility/accessibility_manager_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/chromeos/accessibility/magnification_manager_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/chromeos/app_mode/kiosk_profile_loader.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/chromeos/app_mode/kiosk_profile_loader.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +7 lines, -7 lines 0 comments Download
M chrome/browser/chromeos/login/app_launch_signin_screen.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/chromeos/login/auth/chrome_login_performer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/chromeos/login/existing_user_controller.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/chromeos/login/existing_user_controller.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 4 chunks +11 lines, -8 lines 0 comments Download
M chrome/browser/chromeos/login/existing_user_controller_auto_login_unittest.cc View 1 2 3 4 5 6 7 8 3 chunks +0 lines, -8 lines 0 comments Download
M chrome/browser/chromeos/login/existing_user_controller_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 19 chunks +77 lines, -103 lines 0 comments Download
D chrome/browser/chromeos/login/fake_login_utils.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +0 lines, -48 lines 0 comments Download
M chrome/browser/chromeos/login/fake_login_utils.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +0 lines, -126 lines 0 comments Download
M chrome/browser/chromeos/login/lock/screen_locker.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +1 line, -2 lines 0 comments Download
M chrome/browser/chromeos/login/lock/screen_locker_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/chromeos/login/lock/screen_locker_tester.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/login/lock/screen_locker_tester.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +4 lines, -3 lines 0 comments Download
M chrome/browser/chromeos/login/login_manager_test.h View 1 2 3 4 5 6 7 8 9 3 chunks +0 lines, -4 lines 0 comments Download
M chrome/browser/chromeos/login/login_manager_test.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 4 chunks +9 lines, -6 lines 0 comments Download
M chrome/browser/chromeos/login/login_utils.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +0 lines, -90 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 1 chunk +0 lines, -170 lines 0 comments Download
D chrome/browser/chromeos/login/mock_login_utils.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +0 lines, -49 lines 0 comments Download
D chrome/browser/chromeos/login/mock_login_utils.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +0 lines, -34 lines 0 comments Download
M chrome/browser/chromeos/login/screens/network_screen.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/login/screens/network_screen.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +7 lines, -1 line 0 comments Download
M chrome/browser/chromeos/login/screens/user_image_screen.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +4 lines, -1 line 0 comments Download
M chrome/browser/chromeos/login/session/user_session_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 6 chunks +35 lines, -5 lines 0 comments Download
M chrome/browser/chromeos/login/session/user_session_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 10 chunks +58 lines, -18 lines 0 comments Download
A chrome/browser/chromeos/login/session/user_session_manager_test_api.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +36 lines, -0 lines 0 comments Download
A chrome/browser/chromeos/login/session/user_session_manager_test_api.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +26 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/login/session_login_browsertest.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/chromeos/login/supervised/supervised_user_login_flow.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/login/supervised/supervised_user_test_base.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/chromeos/login/ui/login_display_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/chromeos/login/ui/user_adding_screen_browsertest.cc View 1 2 3 4 5 6 7 8 9 2 chunks +0 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/login/users/fake_chrome_user_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +12 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/login/users/fake_chrome_user_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 2 chunks +20 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/login/wizard_controller.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 3 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/chromeos/net/network_portal_detector_impl_browsertest.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/chromeos/policy/user_cloud_policy_manager_factory_chromeos.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +3 lines, -4 lines 0 comments Download
M chrome/browser/chromeos/preferences_browsertest.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/chromeos/profiles/profile_helper.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/settings/cros_settings.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/settings/cros_settings.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +19 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/system/tray_accessibility_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/notifications/login_state_notification_blocker_chromeos_browsertest.cc View 1 2 3 4 5 6 7 8 9 2 chunks +0 lines, -2 lines 0 comments Download
M chrome/browser/ui/webui/options/chromeos/accounts_options_browsertest.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M chrome/chrome_browser_chromeos.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 2 chunks +1 line, -2 lines 0 comments Download
M chrome/chrome_tests_unit.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +2 lines, -4 lines 0 comments Download
M chromeos/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +0 lines, -2 lines 0 comments Download
M chromeos/chromeos.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 2 chunks +2 lines, -2 lines 0 comments Download
D chromeos/login/auth/mock_authenticator.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +0 lines, -59 lines 0 comments Download
M chromeos/login/auth/mock_authenticator.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +0 lines, -96 lines 0 comments Download
A + chromeos/login/auth/stub_authenticator.h View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +7 lines, -8 lines 0 comments Download
A + chromeos/login/auth/stub_authenticator.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +36 lines, -24 lines 0 comments Download
M components/user_manager/user.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 2 chunks +0 lines, -2 lines 0 comments Download

Messages

Total messages: 15 (7 generated)
Nikita (slow)
Dmitry, please review. Some changes like those in network_screen.cc were needed since tests are now ...
5 years, 10 months ago (2015-01-29 16:25:29 UTC) #3
Dmitry Polukhin
lgtm https://codereview.chromium.org/745613002/diff/390001/chrome/browser/chromeos/login/existing_user_controller_browsertest.cc File chrome/browser/chromeos/login/existing_user_controller_browsertest.cc (right): https://codereview.chromium.org/745613002/diff/390001/chrome/browser/chromeos/login/existing_user_controller_browsertest.cc#newcode506 chrome/browser/chromeos/login/existing_user_controller_browsertest.cc:506: WizardController* controller = WizardController::default_controller(); What do you think ...
5 years, 10 months ago (2015-02-03 11:33:07 UTC) #4
Nikita (slow)
https://codereview.chromium.org/745613002/diff/390001/chrome/browser/chromeos/login/existing_user_controller_browsertest.cc File chrome/browser/chromeos/login/existing_user_controller_browsertest.cc (right): https://codereview.chromium.org/745613002/diff/390001/chrome/browser/chromeos/login/existing_user_controller_browsertest.cc#newcode506 chrome/browser/chromeos/login/existing_user_controller_browsertest.cc:506: WizardController* controller = WizardController::default_controller(); On 2015/02/03 11:33:07, Dmitry Polukhin ...
5 years, 10 months ago (2015-02-03 13:12:26 UTC) #5
Nikita (slow)
TBR'ing stevenjb@ for owners review of chrome/browser/notifications/login_state_notification_blocker_chromeos_browsertest.cc
5 years, 10 months ago (2015-02-03 13:17:00 UTC) #7
stevenjb
login_state_notification_blocker_chromeos_browsertest.cc lgtm
5 years, 10 months ago (2015-02-03 17:22:45 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/745613002/490001
5 years, 10 months ago (2015-02-05 10:27:19 UTC) #13
commit-bot: I haz the power
Committed patchset #25 (id:490001)
5 years, 10 months ago (2015-02-05 13:58:12 UTC) #14
commit-bot: I haz the power
5 years, 10 months ago (2015-02-05 13:59:32 UTC) #15
Message was sent while issue was closed.
Patchset 25 (id:??) landed as
https://crrev.com/393309fdf609591e8b3225728992011b0c772cfa
Cr-Commit-Position: refs/heads/master@{#314798}

Powered by Google App Engine
This is Rietveld 408576698