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

Issue 363613004: [cros] Define session_manager component with SessionManager base class (Closed)

Created:
6 years, 5 months ago by Nikita (slow)
Modified:
6 years, 5 months ago
Reviewers:
oshima, jam, blundell
CC:
chromium-reviews, stevenjb+watch_chromium.org, davemoore+watch_chromium.org, oshima+watch_chromium.org, nkostylev+watch_chromium.org
Project:
chromium
Visibility:
Public.

Description

[cros] Define session_manager component with SessionManager base class SessionManager is responsible for performing Chrome OS-specific steps to re-launch user session (after crash/stub or in tests) or pre-session UI such as out-of-box or login. ChromeSessionManager is chrome/browser implementation of SessionManager. SessionManager is initialized with specific delegate that is reponsible for initial behavior. These delegates are introduced, see ChromeSessionManager::CreateSessionManager(): * LoginOobeSessionManagerDelegate - launches either out-of-box or login UI, actual branching still happens in ShowLoginWizard() * RestoreAfterCrashSessionManagerDelegate - responsible for re-launching Chrome into existing user session, happens after browser process crash or in "stub user" session. * StubLoginSessionManagerDelegate - starts "stub user" session, when executed on non-CrOS machine w/o parameters or in tests. Extends RestoreAfterCrashSessionManagerDelegate. * KioskAutoLauncherSessionManagerDelegate - automatically starts kiosk app session. Code move in ChromeBrowserMainPartsChromeos: * OptionallyRunChromeOSLoginManager() -> ChromeSessionManager::CreateSessionManager() * RunAutoLaunchKioskApp() -> KioskAutoLauncherSessionManagerDelegate * Session restore code in PostProfileInit() -> RestoreAfterCrashSessionManagerDelegate * Blocks in OptionallyRunChromeOSLoginManager -> to delegates. BUG=387610 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=283437

Patch Set 1 #

Patch Set 2 : delegates #

Patch Set 3 : rebase #

Patch Set 4 : merge StubLogin cleanup CL #

Patch Set 5 : move init code to delegates #

Patch Set 6 : add initial state #

Patch Set 7 : proper restart handling #

Patch Set 8 : cleanup #

Patch Set 9 : rebase #

Patch Set 10 : fix dcheck #

Patch Set 11 : move SessionManager instance to BrowserProcessPlatformPart #

Patch Set 12 : rebase #

Patch Set 13 : move session component under chromeos condition #

Patch Set 14 : add export #

Patch Set 15 : make sure that OAuth session is not restored in tests + export for SessionManagerDelegate #

Patch Set 16 : move factory method #

Patch Set 17 : rebase, fix tests - revert back to existing behavior #

Patch Set 18 : rename session -> session_manager #

Patch Set 19 : rebase #

Total comments: 17

Patch Set 20 : rebase #

Patch Set 21 : review + fix build #

Total comments: 9

Patch Set 22 : merge #

Patch Set 23 : review check if using RestoreAfterCrashSessionManagerDelegate by default is fine for tests #

Patch Set 24 : uncomment code, add session_manager OWNERS #

Patch Set 25 : default to RestoreAfterCrashSessionManagerDelegate #

Total comments: 4

Patch Set 26 : nits #

Patch Set 27 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+729 lines, -122 lines) Patch
M chrome/browser/DEPS View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/browser_process_platform_part_chromeos.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 25 5 chunks +23 lines, -1 line 0 comments Download
M chrome/browser/browser_process_platform_part_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 25 2 chunks +22 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/chrome_browser_main_chromeos.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +6 lines, -0 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 25 6 chunks +10 lines, -94 lines 0 comments Download
M chrome/browser/chromeos/login/login_utils_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 3 chunks +7 lines, -1 line 0 comments Download
A chrome/browser/chromeos/login/session/chrome_session_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +36 lines, -0 lines 0 comments Download
A chrome/browser/chromeos/login/session/chrome_session_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 23 24 1 chunk +86 lines, -0 lines 0 comments Download
A chrome/browser/chromeos/login/session/kiosk_auto_launcher_session_manager_delegate.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +29 lines, -0 lines 0 comments Download
A chrome/browser/chromeos/login/session/kiosk_auto_launcher_session_manager_delegate.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 +35 lines, -0 lines 0 comments Download
A chrome/browser/chromeos/login/session/login_oobe_session_manager_delegate.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +29 lines, -0 lines 0 comments Download
A chrome/browser/chromeos/login/session/login_oobe_session_manager_delegate.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +40 lines, -0 lines 0 comments Download
A chrome/browser/chromeos/login/session/restore_after_crash_session_manager_delegate.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +41 lines, -0 lines 0 comments Download
A chrome/browser/chromeos/login/session/restore_after_crash_session_manager_delegate.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 +71 lines, -0 lines 0 comments Download
A chrome/browser/chromeos/login/session/stub_login_session_manager_delegate.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/stub_login_session_manager_delegate.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 +32 lines, -0 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 18 19 20 21 22 23 24 25 3 chunks +9 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 23 24 25 5 chunks +19 lines, -14 lines 0 comments Download
M chrome/browser/chromeos/login/ui/user_adding_screen.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 25 3 chunks +8 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/login/users/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 23 24 25 2 chunks +5 lines, -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 23 24 25 26 2 chunks +11 lines, -0 lines 0 comments Download
M components/components.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +1 line, -0 lines 0 comments Download
A + components/session_manager.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +10 lines, -13 lines 0 comments Download
A + components/session_manager/DEPS View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 0 chunks +-1 lines, --1 lines 0 comments Download
A + components/session_manager/OWNERS View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 0 chunks +-1 lines, --1 lines 0 comments Download
A components/session_manager/core/session_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 +86 lines, -0 lines 0 comments Download
A components/session_manager/core/session_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 1 chunk +49 lines, -0 lines 0 comments Download
A components/session_manager/session_manager_export.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +29 lines, -0 lines 0 comments Download

Messages

Total messages: 40 (0 generated)
Nikita (slow)
patchset #18, cros trybots passed https://uberchromegw.corp.google.com/i/chromiumos.tryserver/builders/x86-generic-tot-chrome-pfq-informational/builds/364 https://uberchromegw.corp.google.com/i/chromiumos.tryserver/builders/amd64-generic-tot-chrome-pfq-informational/builds/1106
6 years, 5 months ago (2014-07-08 13:48:28 UTC) #1
Nikita (slow)
oshima@, I think this CL is ready for review, please take a look. I've resolved ...
6 years, 5 months ago (2014-07-09 09:10:33 UTC) #2
oshima
I'm not big fun of BrowserProcess. I'm ok to use it for now, but I ...
6 years, 5 months ago (2014-07-10 20:07:42 UTC) #3
Nikita (slow)
On 2014/07/10 20:07:42, oshima wrote: > I'm not big fun of BrowserProcess. I'm ok to ...
6 years, 5 months ago (2014-07-11 06:58:44 UTC) #4
Nikita (slow)
On 2014/07/11 06:58:44, Nikita Kostylev wrote: > On 2014/07/10 20:07:42, oshima wrote: > > I'm ...
6 years, 5 months ago (2014-07-11 06:59:54 UTC) #5
Nikita (slow)
> If we make that a singleton then components may use SessionManager::Get() in > both ...
6 years, 5 months ago (2014-07-11 07:00:49 UTC) #6
Nikita (slow)
https://codereview.chromium.org/363613004/diff/410001/chrome/browser/chromeos/login/session/chrome_session_manager.cc File chrome/browser/chromeos/login/session/chrome_session_manager.cc (right): https://codereview.chromium.org/363613004/diff/410001/chrome/browser/chromeos/login/session/chrome_session_manager.cc#newcode26 chrome/browser/chromeos/login/session/chrome_session_manager.cc:26: chromeos::KioskAppManager* app_manager = chromeos::KioskAppManager::Get(); On 2014/07/10 20:07:41, oshima wrote: ...
6 years, 5 months ago (2014-07-14 16:30:11 UTC) #7
oshima
lgtm with nits https://codereview.chromium.org/363613004/diff/410001/components/session_manager/core/session_manager.h File components/session_manager/core/session_manager.h (right): https://codereview.chromium.org/363613004/diff/410001/components/session_manager/core/session_manager.h#newcode21 components/session_manager/core/session_manager.h:21: SESSION_STATE_UNKNOWN = 0, On 2014/07/14 16:30:11, ...
6 years, 5 months ago (2014-07-14 20:03:54 UTC) #8
oshima
On 2014/07/11 07:00:49, Nikita Kostylev wrote: > > If we make that a singleton then ...
6 years, 5 months ago (2014-07-14 20:08:38 UTC) #9
Nikita (slow)
https://codereview.chromium.org/363613004/diff/410001/components/session_manager/core/session_manager.h File components/session_manager/core/session_manager.h (right): https://codereview.chromium.org/363613004/diff/410001/components/session_manager/core/session_manager.h#newcode21 components/session_manager/core/session_manager.h:21: SESSION_STATE_UNKNOWN = 0, On 2014/07/14 20:03:53, oshima wrote: > ...
6 years, 5 months ago (2014-07-15 10:18:43 UTC) #10
Nikita (slow)
+blundell@ fro components/*
6 years, 5 months ago (2014-07-15 10:19:59 UTC) #11
Nikita (slow)
On 2014/07/14 20:08:38, oshima wrote: > On 2014/07/11 07:00:49, Nikita Kostylev wrote: > > > ...
6 years, 5 months ago (2014-07-15 10:26:02 UTC) #12
blundell
//components LGTM On 2014/07/15 10:26:02, Nikita Kostylev wrote: > On 2014/07/14 20:08:38, oshima wrote: > ...
6 years, 5 months ago (2014-07-15 12:12:18 UTC) #13
Nikita (slow)
On 2014/07/15 12:12:18, blundell wrote: > //components LGTM > > On 2014/07/15 10:26:02, Nikita Kostylev ...
6 years, 5 months ago (2014-07-15 13:32:08 UTC) #14
blundell
On 2014/07/15 13:32:08, Nikita Kostylev wrote: > On 2014/07/15 12:12:18, blundell wrote: > > //components ...
6 years, 5 months ago (2014-07-15 13:34:08 UTC) #15
Nikita (slow)
On 2014/07/15 13:34:08, blundell wrote: > On 2014/07/15 13:32:08, Nikita Kostylev wrote: > > > ...
6 years, 5 months ago (2014-07-15 13:38:25 UTC) #16
blundell
On 2014/07/15 13:38:25, Nikita Kostylev wrote: > On 2014/07/15 13:34:08, blundell wrote: > > On ...
6 years, 5 months ago (2014-07-15 13:41:01 UTC) #17
Nikita (slow)
On 2014/07/15 13:41:01, blundell wrote: > On 2014/07/15 13:38:25, Nikita Kostylev wrote: > > On ...
6 years, 5 months ago (2014-07-15 14:40:19 UTC) #18
blundell
On 2014/07/15 14:40:19, Nikita Kostylev wrote: > On 2014/07/15 13:41:01, blundell wrote: > > On ...
6 years, 5 months ago (2014-07-15 14:42:18 UTC) #19
Nikita (slow)
https://codereview.chromium.org/363613004/diff/450001/chrome/browser/browser_process_platform_part_chromeos.cc File chrome/browser/browser_process_platform_part_chromeos.cc (right): https://codereview.chromium.org/363613004/diff/450001/chrome/browser/browser_process_platform_part_chromeos.cc#newcode52 chrome/browser/browser_process_platform_part_chromeos.cc:52: DCHECK(CalledOnValidThread()); On 2014/07/14 20:03:53, oshima wrote: > Do you ...
6 years, 5 months ago (2014-07-15 17:47:47 UTC) #20
Nikita (slow)
+jam@ for owners review chrome/browser/DEPS chrome/browser/browser_process_platform_part_chromeos*
6 years, 5 months ago (2014-07-15 17:50:04 UTC) #21
Nikita (slow)
The CQ bit was checked by nkostylev@chromium.org
6 years, 5 months ago (2014-07-15 17:50:14 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/nkostylev@chromium.org/363613004/530001
6 years, 5 months ago (2014-07-15 17:52:48 UTC) #23
Nikita (slow)
The CQ bit was unchecked by nkostylev@chromium.org
6 years, 5 months ago (2014-07-15 18:18:38 UTC) #24
jam
lgtm with nits https://codereview.chromium.org/363613004/diff/530001/chrome/browser/browser_process_platform_part_chromeos.h File chrome/browser/browser_process_platform_part_chromeos.h (right): https://codereview.chromium.org/363613004/diff/530001/chrome/browser/browser_process_platform_part_chromeos.h#newcode56 chrome/browser/browser_process_platform_part_chromeos.h:56: virtual session_manager::SessionManager* session_manager(); nit: per style ...
6 years, 5 months ago (2014-07-16 05:42:43 UTC) #25
jam
lgtm with nits
6 years, 5 months ago (2014-07-16 05:42:44 UTC) #26
Nikita (slow)
https://codereview.chromium.org/363613004/diff/530001/chrome/browser/browser_process_platform_part_chromeos.h File chrome/browser/browser_process_platform_part_chromeos.h (right): https://codereview.chromium.org/363613004/diff/530001/chrome/browser/browser_process_platform_part_chromeos.h#newcode56 chrome/browser/browser_process_platform_part_chromeos.h:56: virtual session_manager::SessionManager* session_manager(); On 2014/07/16 05:42:43, jam wrote: > ...
6 years, 5 months ago (2014-07-16 08:29:48 UTC) #27
Nikita (slow)
The CQ bit was checked by nkostylev@chromium.org
6 years, 5 months ago (2014-07-16 08:34:03 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/nkostylev@chromium.org/363613004/570001
6 years, 5 months ago (2014-07-16 08:36:40 UTC) #29
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: win_chromium_rel on tryserver.chromium ...
6 years, 5 months ago (2014-07-16 12:25:04 UTC) #30
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 5 months ago (2014-07-16 14:21:45 UTC) #31
commit-bot: I haz the power
Try jobs failed on following builders: android_dbg_triggered_tests on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/android_dbg_triggered_tests/builds/171493)
6 years, 5 months ago (2014-07-16 14:21:46 UTC) #32
Nikita (slow)
The CQ bit was checked by nkostylev@chromium.org
6 years, 5 months ago (2014-07-16 14:37:08 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/nkostylev@chromium.org/363613004/570001
6 years, 5 months ago (2014-07-16 14:39:18 UTC) #34
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_dbg_triggered_tests on tryserver.chromium ...
6 years, 5 months ago (2014-07-16 15:06:55 UTC) #35
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 5 months ago (2014-07-16 15:28:49 UTC) #36
commit-bot: I haz the power
Try jobs failed on following builders: android_dbg_triggered_tests on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/android_dbg_triggered_tests/builds/171543)
6 years, 5 months ago (2014-07-16 15:28:50 UTC) #37
Nikita (slow)
The CQ bit was checked by nkostylev@chromium.org
6 years, 5 months ago (2014-07-16 15:32:39 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/nkostylev@chromium.org/363613004/570001
6 years, 5 months ago (2014-07-16 15:34:10 UTC) #39
commit-bot: I haz the power
6 years, 5 months ago (2014-07-16 18:20:48 UTC) #40
Message was sent while issue was closed.
Change committed as 283437

Powered by Google App Engine
This is Rietveld 408576698