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

Issue 564453003: Access to Chrome via the System Tray should go through the User Manager. (Closed)

Created:
6 years, 3 months ago by Mike Lerman
Modified:
6 years ago
CC:
chromium-reviews, tfarina, rginda+watch_chromium.org, yoshiki+watch_chromium.org, arv+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Access to Chrome via the System Tray should go through the User Manager. If the most recent profile is locked and the user uses the Windows system tray to access the Task Manager or About Chrome, the user will now first be presented with the User Manager, and only after selecting or unlocking a profile will they be brought automatically to their original destination. BUG=409030 TEST=Enable --new-profile-management. Have at least one background app running under your profile (e.g. Hangouts). Close Chrome. In the system tray, Chrome ->Task Manager or About Chrome. Only after unlocking your profile or opening a new profile, you'll see the original selection. Committed: https://crrev.com/e29d00321d1b5ef5d46097d94f3a4a8be7029ec2 Cr-Commit-Position: refs/heads/master@{#296489}

Patch Set 1 #

Patch Set 2 : Minor pre-review cleanup #

Total comments: 20

Patch Set 3 : Estade comments #

Total comments: 6

Patch Set 4 : Weak UserMgr pointer, better comments, fewer enums! #

Patch Set 5 : Mac support #

Patch Set 6 : Listen to the window #

Total comments: 6

Patch Set 7 : Rebase #

Total comments: 4

Patch Set 8 : string16->string. Simplify OnbrowserWindowReady. #

Total comments: 2

Patch Set 9 : Refactor ShowUserManager into a new static class #

Total comments: 18

Patch Set 10 : Mac compilation and estade's nits #

Patch Set 11 : pkasting nits too #

Patch Set 12 : Simplify UserManager View/Mac #

Total comments: 4

Patch Set 13 : Pkasting's nits #

Total comments: 9

Patch Set 14 : Alexei's comments #

Patch Set 15 : Rebase #

Total comments: 1

Patch Set 16 : noms nit #

Patch Set 17 : Fix errors to make bots and compilers happy #

Patch Set 18 : Mac unit tests #

Patch Set 19 : Unit test fix #

Patch Set 20 : Indent #

Patch Set 21 : Rebase #

Patch Set 22 : Rebase continued #

Unified diffs Side-by-side diffs Delta from patch set Stats (+384 lines, -220 lines) Patch
M chrome/browser/app_controller_mac.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 3 chunks +10 lines, -4 lines 0 comments Download
M chrome/browser/app_controller_mac_browsertest.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 4 chunks +6 lines, -6 lines 0 comments Download
M chrome/browser/background/background_mode_manager.h View 1 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/background/background_mode_manager.cc View 1 2 3 4 5 6 7 8 3 chunks +44 lines, -7 lines 0 comments Download
M chrome/browser/browser_process_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/profiles/avatar_menu.cc View 1 2 3 4 5 6 7 8 3 chunks +5 lines, -2 lines 0 comments Download
M chrome/browser/profiles/profile_list_desktop_browsertest.cc View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/profiles/profile_manager_browsertest.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/profiles/profile_window.h View 1 2 3 5 chunks +19 lines, -8 lines 0 comments Download
M chrome/browser/profiles/profile_window.cc View 1 2 3 4 5 6 7 8 17 chunks +41 lines, -16 lines 0 comments Download
M chrome/browser/resources/user_manager/user_manager.js View 1 2 3 4 5 6 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/browser_dialogs.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +0 lines, -10 lines 0 comments Download
M chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm 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, -5 lines 0 comments Download
M chrome/browser/ui/cocoa/profiles/user_manager_mac.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +12 lines, -23 lines 0 comments Download
M chrome/browser/ui/cocoa/profiles/user_manager_mac.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 4 chunks +24 lines, -38 lines 0 comments Download
M chrome/browser/ui/cocoa/profiles/user_manager_mac_unittest.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +9 lines, -6 lines 0 comments Download
M chrome/browser/ui/startup/startup_browser_creator.cc View 1 2 3 4 5 6 7 8 2 chunks +4 lines, -1 line 0 comments Download
A chrome/browser/ui/user_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +36 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/profiles/new_avatar_menu_button_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/ui/views/profiles/profile_chooser_view.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 4 chunks +13 lines, -6 lines 0 comments Download
M chrome/browser/ui/views/profiles/user_manager_view.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 3 chunks +6 lines, -20 lines 0 comments Download
M chrome/browser/ui/views/profiles/user_manager_view.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 4 chunks +24 lines, -35 lines 0 comments Download
M chrome/browser/ui/webui/signin/user_manager_screen_handler.h View 1 2 3 4 5 6 7 6 chunks +25 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 15 16 17 18 19 20 10 chunks +79 lines, -24 lines 0 comments Download
M chrome/chrome_browser_ui.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 45 (7 generated)
Mike Lerman
Kind and wonderful reviewers, Please cast your eyes upon this CL. May it be found ...
6 years, 3 months ago (2014-09-11 15:06:55 UTC) #2
Evan Stade
https://codereview.chromium.org/564453003/diff/20001/chrome/browser/resources/user_manager/user_manager.js File chrome/browser/resources/user_manager/user_manager.js (right): https://codereview.chromium.org/564453003/diff/20001/chrome/browser/resources/user_manager/user_manager.js#newcode146 chrome/browser/resources/user_manager/user_manager.js:146: chrome.send('userManagerInitialize'); chrome.send('userManagerInitialize', [window.location.hash]); https://codereview.chromium.org/564453003/diff/20001/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/564453003/diff/20001/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc#newcode675 chrome/browser/ui/webui/signin/user_manager_screen_handler.cc:675: ...
6 years, 3 months ago (2014-09-11 17:02:51 UTC) #3
Mike Lerman
https://codereview.chromium.org/564453003/diff/20001/chrome/browser/resources/user_manager/user_manager.js File chrome/browser/resources/user_manager/user_manager.js (right): https://codereview.chromium.org/564453003/diff/20001/chrome/browser/resources/user_manager/user_manager.js#newcode146 chrome/browser/resources/user_manager/user_manager.js:146: chrome.send('userManagerInitialize'); On 2014/09/11 17:02:50, Evan Stade wrote: > chrome.send('userManagerInitialize', ...
6 years, 3 months ago (2014-09-11 18:49:30 UTC) #4
Evan Stade
https://codereview.chromium.org/564453003/diff/20001/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/564453003/diff/20001/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc#newcode675 chrome/browser/ui/webui/signin/user_manager_screen_handler.cc:675: base::Unretained(this)), On 2014/09/11 18:49:29, Mike Lerman wrote: > On ...
6 years, 3 months ago (2014-09-11 19:02:52 UTC) #5
noms (inactive)
https://codereview.chromium.org/564453003/diff/20001/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/564453003/diff/20001/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc#newcode675 chrome/browser/ui/webui/signin/user_manager_screen_handler.cc:675: base::Unretained(this)), I think we could get in a weird ...
6 years, 3 months ago (2014-09-11 19:05:41 UTC) #6
Peter Kasting
https://codereview.chromium.org/564453003/diff/40001/chrome/browser/ui/browser_dialogs.h File chrome/browser/ui/browser_dialogs.h (right): https://codereview.chromium.org/564453003/diff/40001/chrome/browser/ui/browser_dialogs.h#newcode112 chrome/browser/ui/browser_dialogs.h:112: void ShowUserManagerThenAboutChrome(); In general, I think this whole header ...
6 years, 3 months ago (2014-09-11 20:35:02 UTC) #7
Mike Lerman
Peter, I just saw your comment and will address it soon. In brief, I believe ...
6 years, 3 months ago (2014-09-11 20:51:51 UTC) #8
Evan Stade
https://codereview.chromium.org/564453003/diff/20001/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/564453003/diff/20001/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc#newcode703 chrome/browser/ui/webui/signin/user_manager_screen_handler.cc:703: FROM_HERE, base::Bind(&chrome::ShowTaskManager, browser)); On 2014/09/11 20:51:51, Mike Lerman wrote: ...
6 years, 3 months ago (2014-09-11 21:30:00 UTC) #9
Mike Lerman
Peter a follow-up question for you. Evan, your comment's addressed now. Thanks! https://codereview.chromium.org/564453003/diff/20001/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc File chrome/browser/ui/webui/signin/user_manager_screen_handler.cc ...
6 years, 3 months ago (2014-09-12 14:26:42 UTC) #10
noms (inactive)
https://codereview.chromium.org/564453003/diff/100001/chrome/browser/ui/cocoa/profiles/user_manager_mac.mm File chrome/browser/ui/cocoa/profiles/user_manager_mac.mm (right): https://codereview.chromium.org/564453003/diff/100001/chrome/browser/ui/cocoa/profiles/user_manager_mac.mm#newcode42 chrome/browser/ui/cocoa/profiles/user_manager_mac.mm:42: UserManagerMac::Show(base::FilePath(), Peter's comment aside. I would combine these two ...
6 years, 3 months ago (2014-09-12 14:44:16 UTC) #11
Evan Stade
cool https://codereview.chromium.org/564453003/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/564453003/diff/120001/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc#newcode711 chrome/browser/ui/webui/signin/user_manager_screen_handler.cc:711: if (browser) { just DCHECK(browser) at the top ...
6 years, 3 months ago (2014-09-12 21:33:58 UTC) #12
Peter Kasting
On 2014/09/12 14:26:42, Mike Lerman wrote: > I addressed most of this in the CL ...
6 years, 3 months ago (2014-09-12 22:23:02 UTC) #13
Mike Lerman
https://codereview.chromium.org/564453003/diff/100001/chrome/browser/ui/cocoa/profiles/user_manager_mac.mm File chrome/browser/ui/cocoa/profiles/user_manager_mac.mm (right): https://codereview.chromium.org/564453003/diff/100001/chrome/browser/ui/cocoa/profiles/user_manager_mac.mm#newcode42 chrome/browser/ui/cocoa/profiles/user_manager_mac.mm:42: UserManagerMac::Show(base::FilePath(), On 2014/09/12 14:44:16, Monica Dinculescu wrote: > Peter's ...
6 years, 3 months ago (2014-09-15 13:44:04 UTC) #14
Andrew T Wilson (Slow)
https://codereview.chromium.org/564453003/diff/140001/chrome/browser/background/background_mode_manager.cc File chrome/browser/background/background_mode_manager.cc (right): https://codereview.chromium.org/564453003/diff/140001/chrome/browser/background/background_mode_manager.cc#newcode542 chrome/browser/background/background_mode_manager.cc:542: bmd->ExecuteCommand(command_id, event_flags); What happens here (i.e. if you click ...
6 years, 3 months ago (2014-09-15 13:59:21 UTC) #15
Mike Lerman
Hi Peter, I've implemented the refactoring you suggested. Please review. https://codereview.chromium.org/564453003/diff/140001/chrome/browser/background/background_mode_manager.cc File chrome/browser/background/background_mode_manager.cc (right): https://codereview.chromium.org/564453003/diff/140001/chrome/browser/background/background_mode_manager.cc#newcode542 ...
6 years, 3 months ago (2014-09-15 16:43:11 UTC) #16
Peter Kasting
The UserManagerView comments below probably also apply to e.g. Cocoa. https://codereview.chromium.org/564453003/diff/160001/chrome/browser/ui/user_manager.h File chrome/browser/ui/user_manager.h (right): https://codereview.chromium.org/564453003/diff/160001/chrome/browser/ui/user_manager.h#newcode18 ...
6 years, 3 months ago (2014-09-15 20:17:28 UTC) #17
Evan Stade
my files lgtm https://codereview.chromium.org/564453003/diff/160001/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/564453003/diff/160001/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc#newcode292 chrome/browser/ui/webui/signin/user_manager_screen_handler.cc:292: if (args->GetString(0, &url_hash)) args->GetString(0, &url_hash_) should ...
6 years, 3 months ago (2014-09-15 21:07:22 UTC) #18
Mike Lerman
https://codereview.chromium.org/564453003/diff/160001/chrome/browser/ui/user_manager.h File chrome/browser/ui/user_manager.h (right): https://codereview.chromium.org/564453003/diff/160001/chrome/browser/ui/user_manager.h#newcode18 chrome/browser/ui/user_manager.h:18: // profile given by |profile_path_to_focus|. Based on the value ...
6 years, 3 months ago (2014-09-17 18:31:46 UTC) #19
Peter Kasting
https://codereview.chromium.org/564453003/diff/160001/chrome/browser/ui/views/profiles/user_manager_view.h File chrome/browser/ui/views/profiles/user_manager_view.h (right): https://codereview.chromium.org/564453003/diff/160001/chrome/browser/ui/views/profiles/user_manager_view.h#newcode27 chrome/browser/ui/views/profiles/user_manager_view.h:27: static void Show(const base::FilePath& profile_path_to_focus, On 2014/09/17 18:31:46, Mike ...
6 years, 3 months ago (2014-09-17 20:14:13 UTC) #20
Mike Lerman
https://codereview.chromium.org/564453003/diff/160001/chrome/browser/ui/views/profiles/user_manager_view.h File chrome/browser/ui/views/profiles/user_manager_view.h (right): https://codereview.chromium.org/564453003/diff/160001/chrome/browser/ui/views/profiles/user_manager_view.h#newcode27 chrome/browser/ui/views/profiles/user_manager_view.h:27: static void Show(const base::FilePath& profile_path_to_focus, On 2014/09/17 20:14:13, Peter ...
6 years, 3 months ago (2014-09-18 18:32:45 UTC) #21
Peter Kasting
LGTM https://codereview.chromium.org/564453003/diff/220001/chrome/browser/ui/views/profiles/user_manager_view.cc File chrome/browser/ui/views/profiles/user_manager_view.cc (right): https://codereview.chromium.org/564453003/diff/220001/chrome/browser/ui/views/profiles/user_manager_view.cc#newcode42 chrome/browser/ui/views/profiles/user_manager_view.cc:42: static UserManagerView* instance_ = NULL; This shouldn't be ...
6 years, 3 months ago (2014-09-18 18:55:05 UTC) #22
Mike Lerman
Hi Alexei, Can you review my cocoa changes, please? c/b/ui/cocoa changes? Thanks.
6 years, 3 months ago (2014-09-18 19:08:26 UTC) #24
Alexei Svitkine (slow)
https://codereview.chromium.org/564453003/diff/240001/chrome/browser/app_controller_mac.mm File chrome/browser/app_controller_mac.mm (right): https://codereview.chromium.org/564453003/diff/240001/chrome/browser/app_controller_mac.mm#newcode1255 chrome/browser/app_controller_mac.mm:1255: profiles::USER_MANAGER_NO_TUTORIAL, Nit: Align. https://codereview.chromium.org/564453003/diff/240001/chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm File chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm (right): https://codereview.chromium.org/564453003/diff/240001/chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm#newcode908 chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm:908: ...
6 years, 3 months ago (2014-09-18 20:54:04 UTC) #25
Peter Kasting
https://codereview.chromium.org/564453003/diff/240001/chrome/browser/ui/cocoa/profiles/user_manager_mac.mm File chrome/browser/ui/cocoa/profiles/user_manager_mac.mm (right): https://codereview.chromium.org/564453003/diff/240001/chrome/browser/ui/cocoa/profiles/user_manager_mac.mm#newcode29 chrome/browser/ui/cocoa/profiles/user_manager_mac.mm:29: UserManagerMac* instance_ = NULL; // Weak. On 2014/09/18 20:54:04, ...
6 years, 3 months ago (2014-09-18 21:33:47 UTC) #26
Mike Lerman
Drew, any further comments? https://codereview.chromium.org/564453003/diff/240001/chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm File chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm (right): https://codereview.chromium.org/564453003/diff/240001/chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm#newcode908 chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm:908: profiles::USER_MANAGER_NO_TUTORIAL, On 2014/09/18 20:54:04, Alexei ...
6 years, 3 months ago (2014-09-19 15:49:30 UTC) #27
Andrew T Wilson (Slow)
lgtm
6 years, 3 months ago (2014-09-19 15:53:55 UTC) #28
Alexei Svitkine (slow)
lgtm
6 years, 3 months ago (2014-09-19 15:54:17 UTC) #29
Mike Lerman
Sky, Can I get a review of my change to chrome/browser please? Thanks! Mike
6 years, 3 months ago (2014-09-19 16:54:16 UTC) #31
noms (inactive)
profiles lgtm % nit https://codereview.chromium.org/564453003/diff/280001/chrome/browser/ui/user_manager.h File chrome/browser/ui/user_manager.h (right): https://codereview.chromium.org/564453003/diff/280001/chrome/browser/ui/user_manager.h#newcode30 chrome/browser/ui/user_manager.h:30: static bool IsShowing(); needs a ...
6 years, 3 months ago (2014-09-19 17:31:42 UTC) #32
sky
On 2014/09/19 16:54:16, Mike Lerman wrote: > Sky, > > Can I get a review ...
6 years, 3 months ago (2014-09-19 21:11:16 UTC) #33
Mike Lerman
On 2014/09/19 21:11:16, sky wrote: > On 2014/09/19 16:54:16, Mike Lerman wrote: > > Sky, ...
6 years, 3 months ago (2014-09-20 23:59:55 UTC) #34
Mike Lerman
Ping sky@
6 years, 3 months ago (2014-09-24 15:11:09 UTC) #35
sky
Said files LGTM
6 years, 3 months ago (2014-09-24 15:37:09 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/564453003/380001
6 years, 3 months ago (2014-09-24 16:41:27 UTC) #38
commit-bot: I haz the power
Try jobs failed on following builders: mac_gpu on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/mac_gpu/builds/60112) win_chromium_x64_rel_swarming on tryserver.chromium.win (http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_swarming/builds/12590)
6 years, 3 months ago (2014-09-24 16:45:11 UTC) #40
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/564453003/420001
6 years, 3 months ago (2014-09-24 19:25:26 UTC) #42
commit-bot: I haz the power
Committed patchset #22 (id:420001) as 4ef9352212bc8570f6ab503f1940d3a8a17fe3e1
6 years, 3 months ago (2014-09-24 19:31:33 UTC) #43
commit-bot: I haz the power
6 years, 3 months ago (2014-09-24 19:32:16 UTC) #44
Message was sent while issue was closed.
Patchset 22 (id:??) landed as
https://crrev.com/e29d00321d1b5ef5d46097d94f3a4a8be7029ec2
Cr-Commit-Position: refs/heads/master@{#296489}

Powered by Google App Engine
This is Rietveld 408576698