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

Issue 856733004: Loading the Launcher with a Locked Profile launched UserManager. (Closed)

Created:
5 years, 11 months ago by Mike Lerman
Modified:
5 years, 10 months ago
Reviewers:
xiyuan, sky, tapted
CC:
chromium-reviews, chrome-apps-syd-reviews_chromium.org, tfarina
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Loading the Launcher with a Locked Profile launched UserManager. On Mac, the --show-app-list flag causes the AppLauncher to start loading before the Profile is loaded. For this, the profile_path is sent to AppListService::InitAll(), so that this load can be aborted if it would point to a Locked Profile. The AppListService will no longer permit loading a locked profile, and will direct to the UserManager instead. StartupBrowserCreator has a similar flow. BUG=421308 TEST=Try to load the App Launcher for a locked profile in any possible way the Launcher can be launched ;) It should always direct to the UserManager, upon Profile Selection which then directs to the AppLauncher. Opening the AppLauncher for a non-locked profile should always work smoothly. Committed: https://crrev.com/a312cec5933e53089da6f1c633749f2e18e91a68 Cr-Commit-Position: refs/heads/master@{#313583}

Patch Set 1 #

Patch Set 2 : Don't show app launcher on startup when profile's locked #

Patch Set 3 : Cleanup chrome_pages #

Patch Set 4 : Pre-review cleanup #

Patch Set 5 : UserManager goes to AppLauncher after startup if flag present #

Total comments: 4

Patch Set 6 : Use a testing profile manager #

Total comments: 4

Patch Set 7 : Move ProfileLocked check. Add unit test. #

Total comments: 13

Patch Set 8 : Change UserManagerScreenHandler::ShowAppList to take a Profile*. #

Patch Set 9 : Rebase #

Patch Set 10 : Create UrlHashHelper that listens to browsers closing before using Browser* #

Patch Set 11 : Rebase #

Total comments: 25

Patch Set 12 : tapted comments; use base::Owned for UrlHashHelper; InteractiveUITetst. #

Total comments: 4

Patch Set 13 : Comment an add. #

Patch Set 14 : Track the targeted Browser* in a local var within UrlHashHelper's execute #

Total comments: 6

Patch Set 15 : tapted@: test fixes and remove a const-ref. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+213 lines, -25 lines) Patch
M chrome/browser/chrome_browser_main.h View 1 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/chrome_browser_main_mac.mm View 1 2 3 1 chunk +3 lines, -1 line 0 comments Download
M chrome/browser/profiles/profile_window.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/browser/profiles/profile_window.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +4 lines, -0 lines 0 comments Download
M chrome/browser/ui/app_list/app_list_service.h View 1 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/app_list/app_list_service.cc View 1 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/ui/app_list/app_list_service_disabled.cc View 1 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/app_list/app_list_service_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +9 lines, -0 lines 0 comments Download
M chrome/browser/ui/app_list/app_list_service_interactive_uitest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 5 chunks +66 lines, -0 lines 0 comments Download
M chrome/browser/ui/app_list/app_list_service_mac.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/ui/app_list/app_list_service_mac.mm View 1 2 3 4 5 4 chunks +22 lines, -4 lines 0 comments Download
M chrome/browser/ui/app_list/profile_loader.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +8 lines, -0 lines 0 comments Download
M chrome/browser/ui/app_list/profile_store.h View 1 2 3 4 5 6 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/ui/app_list/test/fake_profile_store.h View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/app_list/test/fake_profile_store.cc View 1 2 3 4 5 6 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/ui/ash/app_list/app_list_service_ash.cc View 1 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/startup/startup_browser_creator.cc View 1 2 3 4 5 6 7 8 1 chunk +6 lines, -3 lines 0 comments Download
M chrome/browser/ui/views/app_list/linux/app_list_service_linux.cc View 1 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/views/app_list/win/app_list_service_win.cc View 1 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/webui/signin/user_manager_screen_handler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +68 lines, -11 lines 0 comments Download

Messages

Total messages: 35 (2 generated)
Mike Lerman
Hey there, reviewers! Feeling that post-OKRs antsy-ness? Looking for some code to review? Do I ...
5 years, 11 months ago (2015-01-16 19:48:10 UTC) #2
xiyuan
Mostly good. https://codereview.chromium.org/856733004/diff/80001/chrome/browser/ui/app_list/app_list_service.h File chrome/browser/ui/app_list/app_list_service.h (right): https://codereview.chromium.org/856733004/diff/80001/chrome/browser/ui/app_list/app_list_service.h#newcode58 chrome/browser/ui/app_list/app_list_service.h:58: const base::FilePath& profile_path); app_list_service_ash.cc and app_list_service_linux.cc need ...
5 years, 11 months ago (2015-01-16 20:31:52 UTC) #3
Mike Lerman
https://codereview.chromium.org/856733004/diff/80001/chrome/browser/ui/app_list/app_list_service.h File chrome/browser/ui/app_list/app_list_service.h (right): https://codereview.chromium.org/856733004/diff/80001/chrome/browser/ui/app_list/app_list_service.h#newcode58 chrome/browser/ui/app_list/app_list_service.h:58: const base::FilePath& profile_path); On 2015/01/16 20:31:52, xiyuan wrote: > ...
5 years, 11 months ago (2015-01-19 21:08:56 UTC) #4
tapted
Sorry for the delay - had to page back in how all this asynchronous stuff ...
5 years, 11 months ago (2015-01-19 22:25:51 UTC) #5
Mike Lerman
On 2015/01/19 22:25:51, tapted wrote: > Sorry for the delay - had to page back ...
5 years, 11 months ago (2015-01-20 00:02:41 UTC) #6
Mike Lerman
https://codereview.chromium.org/856733004/diff/100001/chrome/browser/ui/app_list/app_list_service_impl.cc File chrome/browser/ui/app_list/app_list_service_impl.cc (right): https://codereview.chromium.org/856733004/diff/100001/chrome/browser/ui/app_list/app_list_service_impl.cc#newcode98 chrome/browser/ui/app_list/app_list_service_impl.cc:98: UserManager::Show(base::FilePath(), On 2015/01/19 22:25:50, tapted wrote: > WDYT about ...
5 years, 11 months ago (2015-01-21 21:54:13 UTC) #7
xiyuan
LGTM my part
5 years, 11 months ago (2015-01-21 22:04:52 UTC) #8
tapted
lgtm Thanks! nice test. And good choice for test harness - there is (non-interactive) AppListServiceUnitTest, ...
5 years, 11 months ago (2015-01-21 22:47:21 UTC) #9
Mike Lerman
sky@, over to you for review, please! chrome/browser and chrome/browser/ui/startup. tapted@, I'll address these.
5 years, 11 months ago (2015-01-22 03:14:44 UTC) #10
sky
https://codereview.chromium.org/856733004/diff/120001/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc File chrome/browser/ui/webui/signin/user_manager_screen_handler.cc (right): https://codereview.chromium.org/856733004/diff/120001/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc#newcode741 chrome/browser/ui/webui/signin/user_manager_screen_handler.cc:741: FROM_HERE, base::Bind(&ShowAppList, browser, desktop_type_)); How do you know browser ...
5 years, 11 months ago (2015-01-22 18:26:15 UTC) #11
Mike Lerman
Thanks, sky@. tapted@, can you take another look at the interactiveuitest? Thanks! https://codereview.chromium.org/856733004/diff/120001/chrome/browser/ui/app_list/app_list_service_impl.cc File chrome/browser/ui/app_list/app_list_service_impl.cc ...
5 years, 11 months ago (2015-01-23 16:58:33 UTC) #12
sky
https://codereview.chromium.org/856733004/diff/120001/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc File chrome/browser/ui/webui/signin/user_manager_screen_handler.cc (right): https://codereview.chromium.org/856733004/diff/120001/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc#newcode741 chrome/browser/ui/webui/signin/user_manager_screen_handler.cc:741: FROM_HERE, base::Bind(&ShowAppList, browser, desktop_type_)); On 2015/01/23 16:58:33, Mike Lerman ...
5 years, 11 months ago (2015-01-23 17:55:04 UTC) #13
Mike Lerman
https://codereview.chromium.org/856733004/diff/120001/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc File chrome/browser/ui/webui/signin/user_manager_screen_handler.cc (right): https://codereview.chromium.org/856733004/diff/120001/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc#newcode741 chrome/browser/ui/webui/signin/user_manager_screen_handler.cc:741: FROM_HERE, base::Bind(&ShowAppList, browser, desktop_type_)); For the Profile, we should ...
5 years, 11 months ago (2015-01-23 18:21:03 UTC) #14
sky
It's not the null I'm worried about. It's about the browser/profile being deleted by the ...
5 years, 11 months ago (2015-01-23 20:23:46 UTC) #15
Mike Lerman
I think the answer, then, is to use BrowserFinder on the Profile* (which never gets ...
5 years, 11 months ago (2015-01-26 15:44:30 UTC) #16
sky
BrowserFinder isn't the right solution. Instead your object should listen for browser to be destroyed ...
5 years, 11 months ago (2015-01-26 16:56:50 UTC) #17
tapted
Sorry for the lag - it was a public holiday here on Monday. And I'm ...
5 years, 11 months ago (2015-01-27 02:52:55 UTC) #18
tapted
https://codereview.chromium.org/856733004/diff/200001/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc File chrome/browser/ui/webui/signin/user_manager_screen_handler.cc (right): https://codereview.chromium.org/856733004/diff/200001/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc#newcode201 chrome/browser/ui/webui/signin/user_manager_screen_handler.cc:201: AppListService* app_list_service = AppListService::Get(desktop_type_); On 2015/01/27 02:52:55, tapted wrote: ...
5 years, 11 months ago (2015-01-27 02:56:36 UTC) #19
Mike Lerman
Thanks Trent and Scott for your comments. The solution below addresses what happens if a ...
5 years, 10 months ago (2015-01-27 14:59:49 UTC) #20
sky
On 2015/01/27 14:59:49, Mike Lerman wrote: > Thanks Trent and Scott for your comments. > ...
5 years, 10 months ago (2015-01-27 17:12:20 UTC) #21
noms (inactive)
On 2015/01/27 17:12:20, sky wrote: > On 2015/01/27 14:59:49, Mike Lerman wrote: > > Thanks ...
5 years, 10 months ago (2015-01-27 17:44:50 UTC) #22
sky
LGTM https://codereview.chromium.org/856733004/diff/220001/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc File chrome/browser/ui/webui/signin/user_manager_screen_handler.cc (right): https://codereview.chromium.org/856733004/diff/220001/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc#newcode194 chrome/browser/ui/webui/signin/user_manager_screen_handler.cc:194: browser_ = chrome::FindLastActiveWithProfile(profile_, desktop_type_); nit: seems safer to ...
5 years, 10 months ago (2015-01-27 17:54:31 UTC) #23
Mike Lerman
Thanks Monica and Scott. Trent, any further comments, since I already have your LGTM? If ...
5 years, 10 months ago (2015-01-27 18:26:11 UTC) #24
sky
https://codereview.chromium.org/856733004/diff/220001/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc File chrome/browser/ui/webui/signin/user_manager_screen_handler.cc (right): https://codereview.chromium.org/856733004/diff/220001/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc#newcode194 chrome/browser/ui/webui/signin/user_manager_screen_handler.cc:194: browser_ = chrome::FindLastActiveWithProfile(profile_, desktop_type_); On 2015/01/27 18:26:11, Mike Lerman ...
5 years, 10 months ago (2015-01-27 21:54:28 UTC) #25
Mike Lerman
https://codereview.chromium.org/856733004/diff/220001/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc File chrome/browser/ui/webui/signin/user_manager_screen_handler.cc (right): https://codereview.chromium.org/856733004/diff/220001/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc#newcode194 chrome/browser/ui/webui/signin/user_manager_screen_handler.cc:194: browser_ = chrome::FindLastActiveWithProfile(profile_, desktop_type_); On 2015/01/27 21:54:27, sky wrote: ...
5 years, 10 months ago (2015-01-27 21:58:49 UTC) #26
sky
LGTM
5 years, 10 months ago (2015-01-27 22:00:51 UTC) #27
tapted
https://codereview.chromium.org/856733004/diff/200001/chrome/browser/ui/app_list/app_list_service_interactive_uitest.cc File chrome/browser/ui/app_list/app_list_service_interactive_uitest.cc (right): https://codereview.chromium.org/856733004/diff/200001/chrome/browser/ui/app_list/app_list_service_interactive_uitest.cc#newcode146 chrome/browser/ui/app_list/app_list_service_interactive_uitest.cc:146: // Pre-load the Guest Profile so the UserManager shows ...
5 years, 10 months ago (2015-01-27 22:40:26 UTC) #28
tapted
.. and a couple of non-code things I missed. https://codereview.chromium.org/856733004/diff/120001/chrome/browser/ui/app_list/app_list_service_interactive_uitest.cc File chrome/browser/ui/app_list/app_list_service_interactive_uitest.cc (right): https://codereview.chromium.org/856733004/diff/120001/chrome/browser/ui/app_list/app_list_service_interactive_uitest.cc#newcode149 chrome/browser/ui/app_list/app_list_service_interactive_uitest.cc:149: ...
5 years, 10 months ago (2015-01-27 22:55:01 UTC) #29
tapted
Fired off some bots to allay my IO-restrictions worries - they all check out, so ...
5 years, 10 months ago (2015-01-28 10:58:48 UTC) #30
Mike Lerman
All done. Thanks everyone! https://codereview.chromium.org/856733004/diff/200001/chrome/browser/ui/app_list/app_list_service_interactive_uitest.cc File chrome/browser/ui/app_list/app_list_service_interactive_uitest.cc (right): https://codereview.chromium.org/856733004/diff/200001/chrome/browser/ui/app_list/app_list_service_interactive_uitest.cc#newcode146 chrome/browser/ui/app_list/app_list_service_interactive_uitest.cc:146: // Pre-load the Guest Profile ...
5 years, 10 months ago (2015-01-28 20:26:46 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/856733004/280001
5 years, 10 months ago (2015-01-28 20:28:04 UTC) #33
commit-bot: I haz the power
Committed patchset #15 (id:280001)
5 years, 10 months ago (2015-01-28 21:14:01 UTC) #34
commit-bot: I haz the power
5 years, 10 months ago (2015-01-28 21:15:54 UTC) #35
Message was sent while issue was closed.
Patchset 15 (id:??) landed as
https://crrev.com/a312cec5933e53089da6f1c633749f2e18e91a68
Cr-Commit-Position: refs/heads/master@{#313583}

Powered by Google App Engine
This is Rietveld 408576698