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

Issue 13495003: Add LoginState class to src/chromeos/login (Closed)

Created:
7 years, 8 months ago by stevenjb
Modified:
7 years, 8 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 LoginState class to src/chromeos/login BUG=226495 For Misc. chromeos-specific chrome/browser login related changes: TBR=sky@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=193699

Patch Set 1 #

Patch Set 2 : . #

Total comments: 7

Patch Set 3 : Add unit test #

Patch Set 4 : Add IsSessionStarted() to LoginState and move login switches to src/chromeos #

Patch Set 5 : Fix tests #

Patch Set 6 : Initialize LoginState and fix UserManagerImpl logic #

Patch Set 7 : Rebase #

Patch Set 8 : Rebase + Fix LoginUtilsTest #

Patch Set 9 : Separate out login switches, refactor AshSystemTrayDelegate::GetUserLoginStatus #

Patch Set 10 : Replace UserManager::IsUserLoggedIn with LoginState where appropriate #

Patch Set 11 : Fix AlwaysLoggedIn() #

Patch Set 12 : Restore LOGGED_IN_KIOSK_APP #

Total comments: 4

Patch Set 13 : Feedback round 1 #

Total comments: 59

Patch Set 14 : Review feedback #

Total comments: 1

Patch Set 15 : Rebase #

Total comments: 2

Patch Set 16 : Rebase + fix tests #

Patch Set 17 : Rebse + Fix comment #

Patch Set 18 : Separate LoggedInState / LoggedInUserType #

Patch Set 19 : Elim LOGGED_IN_LOCKED #

Total comments: 12

Patch Set 20 : Rebase #

Patch Set 21 : Address feedback #

Total comments: 9

Patch Set 22 : Add IsUserAuthenticated() #

Patch Set 23 : Check logged_in_user_, not sesion_started_ for logged_in_state #

Total comments: 1

Patch Set 24 : Check IsInitialized() in FileBrowserEventRouter for tests. #

Patch Set 25 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+394 lines, -99 lines) Patch
M ash/system/user/login_status.h 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 1 chunk +8 lines, -8 lines 0 comments Download
M chrome/browser/automation/automation_provider.cc View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/background/ash_user_wallpaper_delegate.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 4 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/chromeos/chrome_browser_main_chromeos.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 3 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/cros/cert_library.cc View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/extensions/file_manager/file_manager_event_router.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 3 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/kiosk_mode/kiosk_mode_screensaver.cc View 1 2 3 4 5 6 7 8 9 4 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/chromeos/login/base_login_display_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +8 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/login/login_utils_browsertest.cc View 1 2 3 4 5 6 7 8 3 chunks +4 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/login/user_manager_impl.h View 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/login/user_manager_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 6 chunks +33 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/options/wifi_config_view.cc View 1 2 3 4 5 6 7 8 9 3 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/chromeos/options/wimax_config_view.cc View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/power/power_button_observer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +4 lines, -24 lines 0 comments Download
M chrome/browser/chromeos/status/data_promo_notification.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 +3 lines, -4 lines 0 comments Download
M chrome/browser/chromeos/system/ash_system_tray_delegate.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 3 chunks +30 lines, -14 lines 0 comments Download
M chrome/browser/extensions/extension_system.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/google_apis/auth_service.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 2 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/ui/ash/ash_init.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +2 lines, -13 lines 0 comments Download
M chrome/browser/ui/ash/chrome_shell_delegate_chromeos.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +2 lines, -11 lines 0 comments Download
M chrome/browser/ui/webui/screenshot_source.cc View 1 2 3 4 5 6 7 8 9 2 chunks +2 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 23 24 2 chunks +3 lines, -0 lines 0 comments Download
A chromeos/login/login_state.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +81 lines, -0 lines 0 comments Download
A chromeos/login/login_state.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +105 lines, -0 lines 0 comments Download
A chromeos/login/login_state_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +76 lines, -0 lines 0 comments Download

Messages

Total messages: 38 (0 generated)
stevenjb
Eventually it would be great to get all of UserManager into src/chromeos, but in the ...
7 years, 8 months ago (2013-04-03 02:23:08 UTC) #1
bartfab (slow)
We will be running a hackathon very soon to refactor and update the UserManager and ...
7 years, 8 months ago (2013-04-03 08:21:35 UTC) #2
Nikita (slow)
This state has to be multi-profile aware from the start as we add that support ...
7 years, 8 months ago (2013-04-03 10:23:24 UTC) #3
Nikita (slow)
On 2013/04/03 10:23:24, Nikita Kostylev wrote: > This state has to be multi-profile aware from ...
7 years, 8 months ago (2013-04-03 10:26:30 UTC) #4
Nikita (slow)
I think that if we want to introduce something like this state it has to ...
7 years, 8 months ago (2013-04-03 10:29:17 UTC) #5
stevenjb
https://chromiumcodereview.appspot.com/13495003/diff/7/chrome/browser/chromeos/login/user_manager_impl.cc File chrome/browser/chromeos/login/user_manager_impl.cc (right): https://chromiumcodereview.appspot.com/13495003/diff/7/chrome/browser/chromeos/login/user_manager_impl.cc#newcode1316 chrome/browser/chromeos/login/user_manager_impl.cc:1316: login_state = LoginState::LOGGED_IN_KIOSK_APP; On 2013/04/03 08:21:36, bartfab wrote: > ...
7 years, 8 months ago (2013-04-03 17:21:42 UTC) #6
stevenjb
On 2013/04/03 10:29:17, Nikita Kostylev wrote: > I think that if we want to introduce ...
7 years, 8 months ago (2013-04-03 17:23:58 UTC) #7
Nikita (slow)
https://chromiumcodereview.appspot.com/13495003/diff/7/chrome/browser/chromeos/login/user_manager_impl.cc File chrome/browser/chromeos/login/user_manager_impl.cc (right): https://chromiumcodereview.appspot.com/13495003/diff/7/chrome/browser/chromeos/login/user_manager_impl.cc#newcode1316 chrome/browser/chromeos/login/user_manager_impl.cc:1316: login_state = LoginState::LOGGED_IN_KIOSK_APP; On 2013/04/03 17:21:42, stevenjb (chromium) wrote: ...
7 years, 8 months ago (2013-04-03 17:48:13 UTC) #8
Nikita (slow)
So LoginState would be a temporary implementation till UserManager is migrated to src/chromeos ?
7 years, 8 months ago (2013-04-03 17:52:46 UTC) #9
stevenjb
On 2013/04/03 17:48:13, Nikita Kostylev wrote: > https://chromiumcodereview.appspot.com/13495003/diff/7/chrome/browser/chromeos/login/user_manager_impl.cc > File chrome/browser/chromeos/login/user_manager_impl.cc (right): > > https://chromiumcodereview.appspot.com/13495003/diff/7/chrome/browser/chromeos/login/user_manager_impl.cc#newcode1316 ...
7 years, 8 months ago (2013-04-03 18:16:38 UTC) #10
stevenjb
On 2013/04/03 17:52:46, Nikita Kostylev wrote: > So LoginState would be a temporary implementation till ...
7 years, 8 months ago (2013-04-03 18:18:40 UTC) #11
Nikita (slow)
There's also ash::user::LoginStatus enum.
7 years, 8 months ago (2013-04-04 08:26:10 UTC) #12
stevenjb
OK, I: * extracted the switches changes * eliminated currently unused states (LOCALLY_MANAGED, KIOSK) * ...
7 years, 8 months ago (2013-04-04 19:57:31 UTC) #13
stevenjb
On 2013/04/04 08:26:10, Nikita Kostylev wrote: > There's also ash::user::LoginStatus enum. Also: I can't eliminate ...
7 years, 8 months ago (2013-04-04 20:11:54 UTC) #14
xiyuan
On 2013/04/04 19:57:31, stevenjb (chromium) wrote: > OK, I: > * extracted the switches changes ...
7 years, 8 months ago (2013-04-04 20:29:22 UTC) #15
stevenjb
On 2013/04/04 20:29:22, xiyuan wrote: > On 2013/04/04 19:57:31, stevenjb (chromium) wrote: > > OK, ...
7 years, 8 months ago (2013-04-04 20:50:15 UTC) #16
stevenjb (google-dont-use)
Added back LOGGED_IN_KIOSK_APP On Thu, Apr 4, 2013 at 1:50 PM, <stevenjb@chromium.org> wrote: > On ...
7 years, 8 months ago (2013-04-04 20:57:51 UTC) #17
xiyuan
LGTM but wait for nkostylev and bartfab. https://codereview.chromium.org/13495003/diff/48001/chrome/browser/chromeos/status/data_promo_notification.cc File chrome/browser/chromeos/status/data_promo_notification.cc (right): https://codereview.chromium.org/13495003/diff/48001/chrome/browser/chromeos/status/data_promo_notification.cc#newcode144 chrome/browser/chromeos/status/data_promo_notification.cc:144: LoginState::Get()->GetLoginState() != ...
7 years, 8 months ago (2013-04-04 21:24:53 UTC) #18
stevenjb
https://codereview.chromium.org/13495003/diff/48001/chrome/browser/chromeos/status/data_promo_notification.cc File chrome/browser/chromeos/status/data_promo_notification.cc (right): https://codereview.chromium.org/13495003/diff/48001/chrome/browser/chromeos/status/data_promo_notification.cc#newcode144 chrome/browser/chromeos/status/data_promo_notification.cc:144: LoginState::Get()->GetLoginState() != LoginState::LOGGED_IN_GUEST && On 2013/04/04 21:24:54, xiyuan wrote: ...
7 years, 8 months ago (2013-04-04 21:35:46 UTC) #19
Nikita (slow)
lgtm with nits Please wait for review from bartafb@ https://codereview.chromium.org/13495003/diff/52001/ash/system/user/login_status.h File ash/system/user/login_status.h (left): https://codereview.chromium.org/13495003/diff/52001/ash/system/user/login_status.h#oldcode20 ash/system/user/login_status.h:20: ...
7 years, 8 months ago (2013-04-05 04:08:52 UTC) #20
bartfab (slow)
I think this CL is taking things in the wrong direction. With chromeos::LoginState, every consumer ...
7 years, 8 months ago (2013-04-05 13:16:33 UTC) #21
stevenjb
https://codereview.chromium.org/13495003/diff/52001/ash/system/user/login_status.h File ash/system/user/login_status.h (left): https://codereview.chromium.org/13495003/diff/52001/ash/system/user/login_status.h#oldcode20 ash/system/user/login_status.h:20: LOGGED_IN_LOCALLY_MANAGED, // A locally managed user is logged in. ...
7 years, 8 months ago (2013-04-05 18:17:15 UTC) #22
bartfab (slow)
I still don't like the addition of another enum but since there is a strong ...
7 years, 8 months ago (2013-04-08 15:18:36 UTC) #23
stevenjb (google-dont-use)
On Mon, Apr 8, 2013 at 8:18 AM, <bartfab@chromium.org> wrote: > I still don't like ...
7 years, 8 months ago (2013-04-08 23:56:13 UTC) #24
stevenjb
https://codereview.chromium.org/13495003/diff/69002/chrome/browser/chromeos/power/power_button_observer.cc File chrome/browser/chromeos/power/power_button_observer.cc (right): https://codereview.chromium.org/13495003/diff/69002/chrome/browser/chromeos/power/power_button_observer.cc#newcode24 chrome/browser/chromeos/power/power_button_observer.cc:24: return ash::user::LOGGED_IN_NONE; On 2013/04/08 15:18:36, bartfab wrote: > The ...
7 years, 8 months ago (2013-04-09 15:12:26 UTC) #25
stevenjb
OK, I thought about this some, made some time, and did the following: * LoginState ...
7 years, 8 months ago (2013-04-09 21:44:41 UTC) #26
Nikita (slow)
lgtm https://codereview.chromium.org/13495003/diff/87004/chrome/browser/chromeos/background/ash_user_wallpaper_delegate.cc File chrome/browser/chromeos/background/ash_user_wallpaper_delegate.cc (right): https://codereview.chromium.org/13495003/diff/87004/chrome/browser/chromeos/background/ash_user_wallpaper_delegate.cc#newcode92 chrome/browser/chromeos/background/ash_user_wallpaper_delegate.cc:92: return true; nit: add {} as condition takes ...
7 years, 8 months ago (2013-04-10 08:09:22 UTC) #27
stevenjb
https://codereview.chromium.org/13495003/diff/87004/chrome/browser/chromeos/background/ash_user_wallpaper_delegate.cc File chrome/browser/chromeos/background/ash_user_wallpaper_delegate.cc (right): https://codereview.chromium.org/13495003/diff/87004/chrome/browser/chromeos/background/ash_user_wallpaper_delegate.cc#newcode92 chrome/browser/chromeos/background/ash_user_wallpaper_delegate.cc:92: return true; On 2013/04/10 08:09:22, Nikita Kostylev wrote: > ...
7 years, 8 months ago (2013-04-10 16:32:17 UTC) #28
bartfab (slow)
LGTM++ Thanks so much for taking the time to implement this in a really nice ...
7 years, 8 months ago (2013-04-10 18:51:20 UTC) #29
stevenjb
xiyuan@ - can you look at the diffs for: ash_user_wallpaper_delegate.cc auth_service.cc And check the logic ...
7 years, 8 months ago (2013-04-10 20:46:41 UTC) #30
xiyuan
LGTM
7 years, 8 months ago (2013-04-10 20:55:01 UTC) #31
stevenjb
https://chromiumcodereview.appspot.com/13495003/diff/127001/chrome/browser/chromeos/login/user_manager_impl.cc File chrome/browser/chromeos/login/user_manager_impl.cc (right): https://chromiumcodereview.appspot.com/13495003/diff/127001/chrome/browser/chromeos/login/user_manager_impl.cc#newcode1312 chrome/browser/chromeos/login/user_manager_impl.cc:1312: logged_in_state = logged_in_user_ ? LoginState::LOGGED_IN_ACTIVE It turns out that ...
7 years, 8 months ago (2013-04-10 21:16:35 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/stevenjb@chromium.org/13495003/130001
7 years, 8 months ago (2013-04-11 16:20:15 UTC) #33
commit-bot: I haz the power
Failed to apply patch for chrome/browser/chromeos/extensions/file_browser_event_router.cc: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
7 years, 8 months ago (2013-04-11 16:20:32 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/stevenjb@chromium.org/13495003/134002
7 years, 8 months ago (2013-04-11 16:21:38 UTC) #35
commit-bot: I haz the power
Presubmit check for 13495003-134002 failed and returned exit status 1. INFO:root:Found 25 file(s). Running presubmit ...
7 years, 8 months ago (2013-04-11 16:21:59 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/stevenjb@chromium.org/13495003/134002
7 years, 8 months ago (2013-04-11 16:26:46 UTC) #37
commit-bot: I haz the power
7 years, 8 months ago (2013-04-11 18:58:22 UTC) #38
Message was sent while issue was closed.
Change committed as 193699

Powered by Google App Engine
This is Rietveld 408576698