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

Issue 1009403002: Refactor the avatar button/icon class (Closed)

Created:
5 years, 9 months ago by yao
Modified:
5 years, 7 months ago
Reviewers:
msw, noms (inactive)
CC:
chromium-reviews, tfarina
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Refactor the avatar button/icon class. Such that they are based on the same base class. BUG=452524 Committed: https://crrev.com/56078ce434955a67159b59303f6691adb55d7ca1 Cr-Commit-Position: refs/heads/master@{#329249}

Patch Set 1 #

Patch Set 2 : Just make it compile. #

Patch Set 3 : roughly working. #

Patch Set 4 : Cleanup code. #

Patch Set 5 : Fix unit tests. #

Patch Set 6 : Adding a testing profile is unnecessary. #

Patch Set 7 : Nits #

Total comments: 15

Patch Set 8 : Address comments. #

Total comments: 34

Patch Set 9 : Rebase. #

Patch Set 10 : Address comments. #

Total comments: 6

Patch Set 11 : Rebase. #

Patch Set 12 : Address comments. #

Total comments: 5

Patch Set 13 : Address comments. #

Patch Set 14 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+155 lines, -88 lines) Patch
M chrome/browser/ui/views/frame/browser_non_client_frame_view.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +0 lines, -20 lines 0 comments Download
A chrome/browser/ui/views/profiles/avatar_base_button.h View 1 2 3 4 5 6 7 8 9 1 chunk +42 lines, -0 lines 0 comments Download
A chrome/browser/ui/views/profiles/avatar_base_button.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +60 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/profiles/avatar_menu_button.h View 1 2 3 4 5 6 7 8 9 4 chunks +6 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/profiles/avatar_menu_button.cc View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +23 lines, -3 lines 0 comments Download
M chrome/browser/ui/views/profiles/new_avatar_button.h View 1 2 3 4 5 6 7 8 9 2 chunks +7 lines, -18 lines 0 comments Download
M chrome/browser/ui/views/profiles/new_avatar_button.cc View 1 2 3 4 5 6 7 8 9 6 chunks +15 lines, -45 lines 0 comments Download
M chrome/chrome_browser_ui.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 34 (10 generated)
yao
PTAL, thanks!
5 years, 9 months ago (2015-03-25 15:03:14 UTC) #3
noms (inactive)
https://codereview.chromium.org/1009403002/diff/140001/chrome/browser/ui/views/profiles/avatar_base_controller.h File chrome/browser/ui/views/profiles/avatar_base_controller.h (right): https://codereview.chromium.org/1009403002/diff/140001/chrome/browser/ui/views/profiles/avatar_base_controller.h#newcode6 chrome/browser/ui/views/profiles/avatar_base_controller.h:6: #define CHROME_BROWSER_UI_VIEWS_PROFILES_AVATAR_BASE_CONTROLLER_H_ nit: I think Mac UI files are ...
5 years, 9 months ago (2015-03-26 15:26:56 UTC) #4
yao
Thanks for the review. https://codereview.chromium.org/1009403002/diff/140001/chrome/browser/ui/views/profiles/avatar_base_controller.h File chrome/browser/ui/views/profiles/avatar_base_controller.h (right): https://codereview.chromium.org/1009403002/diff/140001/chrome/browser/ui/views/profiles/avatar_base_controller.h#newcode6 chrome/browser/ui/views/profiles/avatar_base_controller.h:6: #define CHROME_BROWSER_UI_VIEWS_PROFILES_AVATAR_BASE_CONTROLLER_H_ On 2015/03/26 15:26:56, ...
5 years, 9 months ago (2015-03-26 18:45:02 UTC) #5
noms (inactive)
https://codereview.chromium.org/1009403002/diff/140001/chrome/browser/ui/views/profiles/avatar_base_controller.h File chrome/browser/ui/views/profiles/avatar_base_controller.h (right): https://codereview.chromium.org/1009403002/diff/140001/chrome/browser/ui/views/profiles/avatar_base_controller.h#newcode6 chrome/browser/ui/views/profiles/avatar_base_controller.h:6: #define CHROME_BROWSER_UI_VIEWS_PROFILES_AVATAR_BASE_CONTROLLER_H_ On 2015/03/26 18:45:01, yao wrote: > On ...
5 years, 8 months ago (2015-03-30 14:54:55 UTC) #6
yao
https://codereview.chromium.org/1009403002/diff/140001/chrome/browser/ui/views/profiles/avatar_base_controller.h File chrome/browser/ui/views/profiles/avatar_base_controller.h (right): https://codereview.chromium.org/1009403002/diff/140001/chrome/browser/ui/views/profiles/avatar_base_controller.h#newcode6 chrome/browser/ui/views/profiles/avatar_base_controller.h:6: #define CHROME_BROWSER_UI_VIEWS_PROFILES_AVATAR_BASE_CONTROLLER_H_ On 2015/03/30 14:54:54, Monica Dinculescu wrote: > ...
5 years, 8 months ago (2015-03-30 15:02:16 UTC) #7
noms (inactive)
https://codereview.chromium.org/1009403002/diff/140001/chrome/browser/ui/views/profiles/avatar_base_controller.h File chrome/browser/ui/views/profiles/avatar_base_controller.h (right): https://codereview.chromium.org/1009403002/diff/140001/chrome/browser/ui/views/profiles/avatar_base_controller.h#newcode6 chrome/browser/ui/views/profiles/avatar_base_controller.h:6: #define CHROME_BROWSER_UI_VIEWS_PROFILES_AVATAR_BASE_CONTROLLER_H_ On 2015/03/30 15:02:16, yao wrote: > On ...
5 years, 8 months ago (2015-03-30 15:04:00 UTC) #8
yao
https://codereview.chromium.org/1009403002/diff/140001/chrome/browser/ui/views/profiles/avatar_base_controller.h File chrome/browser/ui/views/profiles/avatar_base_controller.h (right): https://codereview.chromium.org/1009403002/diff/140001/chrome/browser/ui/views/profiles/avatar_base_controller.h#newcode6 chrome/browser/ui/views/profiles/avatar_base_controller.h:6: #define CHROME_BROWSER_UI_VIEWS_PROFILES_AVATAR_BASE_CONTROLLER_H_ On 2015/03/30 15:04:00, Monica Dinculescu wrote: > ...
5 years, 8 months ago (2015-03-30 23:12:12 UTC) #9
noms (inactive)
lgtm https://codereview.chromium.org/1009403002/diff/140001/chrome/browser/ui/views/profiles/avatar_base_controller.h File chrome/browser/ui/views/profiles/avatar_base_controller.h (right): https://codereview.chromium.org/1009403002/diff/140001/chrome/browser/ui/views/profiles/avatar_base_controller.h#newcode6 chrome/browser/ui/views/profiles/avatar_base_controller.h:6: #define CHROME_BROWSER_UI_VIEWS_PROFILES_AVATAR_BASE_CONTROLLER_H_ On 2015/03/30 23:12:12, yao wrote: > ...
5 years, 8 months ago (2015-03-31 20:47:06 UTC) #10
yao
+Mike for owner's review, thanks!
5 years, 8 months ago (2015-03-31 22:43:03 UTC) #12
msw
https://codereview.chromium.org/1009403002/diff/160001/chrome/browser/ui/views/frame/browser_non_client_frame_view.cc File chrome/browser/ui/views/frame/browser_non_client_frame_view.cc (left): https://codereview.chromium.org/1009403002/diff/160001/chrome/browser/ui/views/frame/browser_non_client_frame_view.cc#oldcode219 chrome/browser/ui/views/frame/browser_non_client_frame_view.cc:219: gfx::Image avatar; Should this call avatar_button_->Update() instead now? https://codereview.chromium.org/1009403002/diff/160001/chrome/browser/ui/views/frame/opaque_browser_frame_view_layout_unittest.cc ...
5 years, 8 months ago (2015-04-01 01:30:17 UTC) #13
yao
Hi Mike, Sorry for the delay. I'm not quite sure about some of your questions, ...
5 years, 8 months ago (2015-04-10 00:43:33 UTC) #15
noms (inactive)
https://codereview.chromium.org/1009403002/diff/160001/chrome/browser/ui/views/profiles/avatar_base_button.h File chrome/browser/ui/views/profiles/avatar_base_button.h (right): https://codereview.chromium.org/1009403002/diff/160001/chrome/browser/ui/views/profiles/avatar_base_button.h#newcode14 chrome/browser/ui/views/profiles/avatar_base_button.h:14: class AvatarBaseButton : public ProfileInfoCacheObserver { On 2015/04/01 01:30:16, ...
5 years, 8 months ago (2015-04-16 22:29:59 UTC) #16
msw
I'm okay with the general premise here if Monica thinks it's worthwhile. https://codereview.chromium.org/1009403002/diff/160001/chrome/browser/ui/views/profiles/avatar_menu_button.cc File chrome/browser/ui/views/profiles/avatar_menu_button.cc ...
5 years, 8 months ago (2015-04-16 22:53:34 UTC) #17
yao
https://codereview.chromium.org/1009403002/diff/220001/chrome/browser/ui/views/frame/opaque_browser_frame_view_layout_unittest.cc File chrome/browser/ui/views/frame/opaque_browser_frame_view_layout_unittest.cc (right): https://codereview.chromium.org/1009403002/diff/220001/chrome/browser/ui/views/frame/opaque_browser_frame_view_layout_unittest.cc#newcode145 chrome/browser/ui/views/frame/opaque_browser_frame_view_layout_unittest.cc:145: // ProfileManager::GetProfileInfoCache won't crash when constructing On 2015/04/16 22:53:34, ...
5 years, 7 months ago (2015-05-04 17:30:06 UTC) #19
msw
lgtm with nits https://codereview.chromium.org/1009403002/diff/280001/chrome/browser/ui/views/profiles/avatar_base_button.cc File chrome/browser/ui/views/profiles/avatar_base_button.cc (right): https://codereview.chromium.org/1009403002/diff/280001/chrome/browser/ui/views/profiles/avatar_base_button.cc#newcode16 chrome/browser/ui/views/profiles/avatar_base_button.cc:16: // profile_manager might be null in ...
5 years, 7 months ago (2015-05-05 17:36:39 UTC) #20
yao
https://codereview.chromium.org/1009403002/diff/280001/chrome/browser/ui/views/profiles/avatar_base_button.cc File chrome/browser/ui/views/profiles/avatar_base_button.cc (right): https://codereview.chromium.org/1009403002/diff/280001/chrome/browser/ui/views/profiles/avatar_base_button.cc#newcode16 chrome/browser/ui/views/profiles/avatar_base_button.cc:16: // profile_manager might be null in tests. On 2015/05/05 ...
5 years, 7 months ago (2015-05-05 17:45:00 UTC) #21
msw
https://codereview.chromium.org/1009403002/diff/280001/chrome/browser/ui/views/profiles/avatar_menu_button.cc File chrome/browser/ui/views/profiles/avatar_menu_button.cc (right): https://codereview.chromium.org/1009403002/diff/280001/chrome/browser/ui/views/profiles/avatar_menu_button.cc#newcode154 chrome/browser/ui/views/profiles/avatar_menu_button.cc:154: const bool should_show_avatar_menu = AvatarMenu::ShouldShowAvatarMenu(); On 2015/05/05 17:45:00, yao ...
5 years, 7 months ago (2015-05-05 17:56:10 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1009403002/300001
5 years, 7 months ago (2015-05-11 19:49:35 UTC) #25
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_gn_dbg on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_gn_dbg/builds/70666) linux_chromium_gn_rel on tryserver.chromium.linux (JOB_FAILED, ...
5 years, 7 months ago (2015-05-11 19:58:26 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1009403002/320001
5 years, 7 months ago (2015-05-11 21:36:57 UTC) #30
commit-bot: I haz the power
Committed patchset #14 (id:320001)
5 years, 7 months ago (2015-05-11 22:13:35 UTC) #31
commit-bot: I haz the power
Patchset 14 (id:??) landed as https://crrev.com/56078ce434955a67159b59303f6691adb55d7ca1 Cr-Commit-Position: refs/heads/master@{#329249}
5 years, 7 months ago (2015-05-11 22:14:57 UTC) #32
robert.bradford
On 2015/05/11 22:14:57, I haz the power (commit-bot) wrote: > Patchset 14 (id:??) landed as ...
5 years, 7 months ago (2015-05-12 12:13:36 UTC) #33
pneubeck (no reviews)
5 years, 7 months ago (2015-05-12 12:28:07 UTC) #34
Message was sent while issue was closed.
A revert of this CL (patchset #14 id:320001) has been created in
https://codereview.chromium.org/1139943002/ by pneubeck@chromium.org.

The reason for reverting is: Very likely has caused the latest flakiness of
BrowserNonClientFrameViewAshTest.AvatarDisplayOnTeleportedWindow
and 
BrowserNonClientFrameViewAshTest.AvatarMenuButtonHitTestOnChromeOS

on 
ChromeOS dbg:

https://build.chromium.org/p/chromium.chromiumos/builders/Linux%20ChromiumOS%....

Powered by Google App Engine
This is Rietveld 408576698