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

Issue 2832903002: cros: Remove supervised user methods from SystemTrayDelegate (Closed)

Created:
3 years, 8 months ago by James Cook
Modified:
3 years, 8 months ago
Reviewers:
Tom Sepez, xiyuan
CC:
chromium-reviews, sadrul, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, kalyank, darin (slow to review)
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

cros: Remove supervised user methods from ash::SystemTrayDelegate For mustash we need to replace SystemTrayDelegate. Use SessionController for supervised user data instead. Send a UserSession update when the Profile becomes available, because supervised user data is kept in a profile keyed service. Don't try to update the system tray item text while the menu is open. The supervised user custodian almost never changes, so we'll see the new value when the menu is opened again. For testing, allow FakeChromeUserManager to skip the fake-addition of a profile to a user on login. It shouldn't be doing this -- in production the profile is loaded later. BUG=712799 TEST=added to ash_unittests and unit_tests Review-Url: https://codereview.chromium.org/2832903002 Cr-Commit-Position: refs/heads/master@{#466752} Committed: https://chromium.googlesource.com/chromium/src/+/b7360f79e32c16690c062f0b44fecd7d5d452c1e

Patch Set 1 #

Patch Set 2 : . #

Patch Set 3 : better test #

Patch Set 4 : ready #

Total comments: 17

Patch Set 5 : remove DCHECK #

Total comments: 2

Patch Set 6 : cleanup FakeChromeUserManager #

Patch Set 7 : review comments #

Total comments: 3

Patch Set 8 : clarify comment #

Patch Set 9 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+472 lines, -370 lines) Patch
M ash/BUILD.gn View 1 2 1 chunk +0 lines, -1 line 0 comments Download
M ash/ash_strings.grd View 1 2 3 4 5 6 7 8 1 chunk +10 lines, -0 lines 0 comments Download
M ash/public/interfaces/session_controller.mojom View 1 2 2 chunks +10 lines, -1 line 0 comments Download
M ash/system/supervised/custodian_info_tray_observer.h View 1 2 1 chunk +0 lines, -23 lines 0 comments Download
M ash/system/supervised/tray_supervised_user.h View 1 2 3 1 chunk +14 lines, -31 lines 0 comments Download
M ash/system/supervised/tray_supervised_user.cc View 1 2 3 4 5 6 1 chunk +67 lines, -73 lines 0 comments Download
M ash/system/supervised/tray_supervised_user_unittest.cc View 1 2 3 2 chunks +65 lines, -2 lines 0 comments Download
M ash/system/tray/hover_highlight_view.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M ash/system/tray/label_tray_view.h View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M ash/system/tray/system_tray.h View 1 2 4 chunks +3 lines, -6 lines 0 comments Download
M ash/system/tray/system_tray.cc View 1 2 4 chunks +6 lines, -8 lines 0 comments Download
M ash/system/tray/system_tray_delegate.h View 1 2 4 chunks +3 lines, -29 lines 0 comments Download
M ash/system/tray/system_tray_delegate.cc View 1 2 2 chunks +0 lines, -18 lines 0 comments Download
M ash/test/test_system_tray_delegate.h View 1 1 chunk +0 lines, -1 line 0 comments Download
M ash/test/test_system_tray_delegate.cc View 1 1 chunk +0 lines, -6 lines 0 comments Download
M chrome/app/chromeos_strings.grdp View 1 chunk +0 lines, -9 lines 0 comments Download
M chrome/browser/chromeos/login/users/fake_chrome_user_manager.h View 1 2 3 4 5 1 chunk +5 lines, -3 lines 0 comments Download
M chrome/browser/chromeos/login/users/fake_chrome_user_manager.cc View 1 2 3 4 5 6 4 chunks +19 lines, -1 line 0 comments Download
M chrome/browser/ui/ash/session_controller_client.h View 1 2 3 4 5 6 5 chunks +27 lines, -4 lines 0 comments Download
M chrome/browser/ui/ash/session_controller_client.cc View 1 2 3 4 5 6 7 6 chunks +88 lines, -12 lines 0 comments Download
M chrome/browser/ui/ash/session_controller_client_unittest.cc View 1 2 3 4 5 6 8 chunks +149 lines, -12 lines 0 comments Download
M chrome/browser/ui/ash/system_tray_delegate_chromeos.h View 1 2 8 chunks +0 lines, -22 lines 0 comments Download
M chrome/browser/ui/ash/system_tray_delegate_chromeos.cc View 1 2 11 chunks +0 lines, -108 lines 0 comments Download
M chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.cc View 1 2 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 40 (31 generated)
James Cook
xiyuan, please take a look at everything. tsepez, please take a look at ash session_controller.mojom.
3 years, 8 months ago (2017-04-21 20:56:14 UTC) #16
Tom Sepez
lgtm
3 years, 8 months ago (2017-04-21 21:12:27 UTC) #17
xiyuan
https://codereview.chromium.org/2832903002/diff/80001/ash/system/supervised/tray_supervised_user.cc File ash/system/supervised/tray_supervised_user.cc (right): https://codereview.chromium.org/2832903002/diff/80001/ash/system/supervised/tray_supervised_user.cc#newcode77 ash/system/supervised/tray_supervised_user.cc:77: nit: OnUserSessionUpdated could be called even when a user ...
3 years, 8 months ago (2017-04-21 23:14:35 UTC) #22
James Cook
xiyuan, please take another look. https://codereview.chromium.org/2832903002/diff/80001/ash/system/supervised/tray_supervised_user.cc File ash/system/supervised/tray_supervised_user.cc (right): https://codereview.chromium.org/2832903002/diff/80001/ash/system/supervised/tray_supervised_user.cc#newcode77 ash/system/supervised/tray_supervised_user.cc:77: On 2017/04/21 23:14:35, xiyuan ...
3 years, 8 months ago (2017-04-24 17:47:26 UTC) #28
xiyuan
Mostly good. One question on using PostTask because ProfileHelper is not ready... https://codereview.chromium.org/2832903002/diff/80001/chrome/browser/ui/ash/session_controller_client.cc File chrome/browser/ui/ash/session_controller_client.cc ...
3 years, 8 months ago (2017-04-24 18:10:09 UTC) #30
James Cook
https://codereview.chromium.org/2832903002/diff/140001/chrome/browser/ui/ash/session_controller_client.cc File chrome/browser/ui/ash/session_controller_client.cc (right): https://codereview.chromium.org/2832903002/diff/140001/chrome/browser/ui/ash/session_controller_client.cc#newcode342 chrome/browser/ui/ash/session_controller_client.cc:342: // Needed because chromeos::ProfileHelper isn't updated at this point, ...
3 years, 8 months ago (2017-04-24 18:34:51 UTC) #31
xiyuan
lgtm https://codereview.chromium.org/2832903002/diff/140001/chrome/browser/ui/ash/session_controller_client.cc File chrome/browser/ui/ash/session_controller_client.cc (right): https://codereview.chromium.org/2832903002/diff/140001/chrome/browser/ui/ash/session_controller_client.cc#newcode342 chrome/browser/ui/ash/session_controller_client.cc:342: // Needed because chromeos::ProfileHelper isn't updated at this ...
3 years, 8 months ago (2017-04-24 19:03:07 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2832903002/180001
3 years, 8 months ago (2017-04-24 19:26:45 UTC) #37
commit-bot: I haz the power
3 years, 8 months ago (2017-04-24 20:45:08 UTC) #40
Message was sent while issue was closed.
Committed patchset #9 (id:180001) as
https://chromium.googlesource.com/chromium/src/+/b7360f79e32c16690c062f0b44fe...

Powered by Google App Engine
This is Rietveld 408576698