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

Issue 462713002: [Win] Profile desktop shortcuts should use the Gaia avatar if it's in use. (Closed)

Created:
6 years, 4 months ago by noms (inactive)
Modified:
6 years, 4 months ago
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

[Win] Profile desktop shortcuts should use the Gaia avatar if it's in use. With --google-profile-info or --enable-new-avatar-menu turned on, signed in profiles can use the account's Gaia image as the profile avatar. The desktop shortcut shouldn't be surprised about this :) Screenshot of the badged shortcuts in all their glory: https://drive.google.com/folderview?id=0B1B1Up4p2NRMUjlTSU1EYUlBVG8&usp=sharing BUG=402162 TEST=Flip --google-profile-info or --enable-new-avatar-menu. Sign in a profile, and change the profile's avatar to the account's Gaia image. The desktop shortcut should update and use the Gaia image correctly. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=289100

Patch Set 1 #

Total comments: 18

Patch Set 2 : everyone gets a scoped_ptr #

Patch Set 3 : alexei comments and revert them scoped_ptrs #

Total comments: 6

Patch Set 4 : rebase #

Patch Set 5 : gab + alexei comments #

Patch Set 6 : moved dcheck #

Total comments: 4

Patch Set 7 : s/_eq/_ge #

Unified diffs Side-by-side diffs Delta from patch set Stats (+44 lines, -17 lines) Patch
M chrome/browser/profiles/profile_info_cache_unittest.cc View 1 2 chunks +3 lines, -1 line 0 comments Download
M chrome/browser/profiles/profile_shortcut_manager_win.cc View 1 2 3 4 5 6 3 chunks +41 lines, -16 lines 0 comments Download

Messages

Total messages: 25 (0 generated)
noms (inactive)
Hi Gab, Added support for Gaia avatars to desktop shortcuts. Please take a look. Thanks!
6 years, 4 months ago (2014-08-11 15:16:12 UTC) #1
gab
Comments below, you'll also want Alexei to take a look. Cheers, Gab https://codereview.chromium.org/462713002/diff/1/chrome/browser/profiles/profile_shortcut_manager_win.cc File chrome/browser/profiles/profile_shortcut_manager_win.cc ...
6 years, 4 months ago (2014-08-11 15:27:59 UTC) #2
noms (inactive)
https://codereview.chromium.org/462713002/diff/1/chrome/browser/profiles/profile_shortcut_manager_win.cc File chrome/browser/profiles/profile_shortcut_manager_win.cc (right): https://codereview.chromium.org/462713002/diff/1/chrome/browser/profiles/profile_shortcut_manager_win.cc#newcode598 chrome/browser/profiles/profile_shortcut_manager_win.cc:598: return bitmap_copy; I just moved the code from one ...
6 years, 4 months ago (2014-08-11 15:44:39 UTC) #3
gab
https://codereview.chromium.org/462713002/diff/1/chrome/browser/profiles/profile_shortcut_manager_win.cc File chrome/browser/profiles/profile_shortcut_manager_win.cc (right): https://codereview.chromium.org/462713002/diff/1/chrome/browser/profiles/profile_shortcut_manager_win.cc#newcode598 chrome/browser/profiles/profile_shortcut_manager_win.cc:598: return bitmap_copy; Ah indeed GetImageResourceSkBitmapCopy() already returns a copy, ...
6 years, 4 months ago (2014-08-11 16:13:09 UTC) #4
Alexei Svitkine (slow)
Should the profile manager listen for when a user signs in, so that it could ...
6 years, 4 months ago (2014-08-11 19:00:08 UTC) #5
Alexei Svitkine (slow)
On 2014/08/11 19:00:08, Alexei Svitkine wrote: > Should the profile manager listen for when a ...
6 years, 4 months ago (2014-08-11 19:00:18 UTC) #6
noms (inactive)
Hmmm, just because a user signs in doesn't mean the user might elect to use ...
6 years, 4 months ago (2014-08-11 19:02:14 UTC) #7
gab
I see, so at the moment it's possible for the profile to be represented by ...
6 years, 4 months ago (2014-08-11 19:05:40 UTC) #8
noms (inactive)
Yup, that's exactly correct. I have a patch ++'ing the version, but everything is crashing ...
6 years, 4 months ago (2014-08-11 19:07:42 UTC) #9
Alexei Svitkine (slow)
Sorry, to be clear, I meant "should we listen for the event where a profile ...
6 years, 4 months ago (2014-08-11 19:10:45 UTC) #10
noms (inactive)
Oh! We listen to OnProfileAvatarChanged, which is triggered by ProfileInfoCache::SetGAIAPictureOfProfileAtIndex and SetIsUsingGAIAPictureOfProfileAtIndex, which is the ...
6 years, 4 months ago (2014-08-11 19:14:22 UTC) #11
Alexei Svitkine (slow)
https://codereview.chromium.org/462713002/diff/1/chrome/browser/profiles/profile_shortcut_manager_win.cc File chrome/browser/profiles/profile_shortcut_manager_win.cc (right): https://codereview.chromium.org/462713002/diff/1/chrome/browser/profiles/profile_shortcut_manager_win.cc#newcode820 chrome/browser/profiles/profile_shortcut_manager_win.cc:820: params.avatar_image_1x = GetSkBitmapCopy(*image); To avoid copying the image twice, ...
6 years, 4 months ago (2014-08-11 19:27:39 UTC) #12
noms (inactive)
Fixed a test! Added a screenshot! Added scoped_ptrs! Please take a look while I'm also ...
6 years, 4 months ago (2014-08-11 19:57:07 UTC) #13
Alexei Svitkine (slow)
https://codereview.chromium.org/462713002/diff/1/chrome/browser/profiles/profile_shortcut_manager_win.cc File chrome/browser/profiles/profile_shortcut_manager_win.cc (right): https://codereview.chromium.org/462713002/diff/1/chrome/browser/profiles/profile_shortcut_manager_win.cc#newcode598 chrome/browser/profiles/profile_shortcut_manager_win.cc:598: return bitmap_copy; On 2014/08/11 15:27:59, gab wrote: > This ...
6 years, 4 months ago (2014-08-11 20:02:32 UTC) #14
gab
https://codereview.chromium.org/462713002/diff/1/chrome/browser/profiles/profile_shortcut_manager_win.cc File chrome/browser/profiles/profile_shortcut_manager_win.cc (right): https://codereview.chromium.org/462713002/diff/1/chrome/browser/profiles/profile_shortcut_manager_win.cc#newcode598 chrome/browser/profiles/profile_shortcut_manager_win.cc:598: return bitmap_copy; On 2014/08/11 20:02:31, Alexei Svitkine wrote: > ...
6 years, 4 months ago (2014-08-11 20:29:44 UTC) #15
noms (inactive)
https://codereview.chromium.org/462713002/diff/1/chrome/browser/profiles/profile_shortcut_manager_win.cc File chrome/browser/profiles/profile_shortcut_manager_win.cc (right): https://codereview.chromium.org/462713002/diff/1/chrome/browser/profiles/profile_shortcut_manager_win.cc#newcode598 chrome/browser/profiles/profile_shortcut_manager_win.cc:598: return bitmap_copy; Reverted! :( On 2014/08/11 20:29:44, gab wrote: ...
6 years, 4 months ago (2014-08-11 20:37:53 UTC) #16
gab
lgtm w/ small request https://codereview.chromium.org/462713002/diff/40001/chrome/browser/profiles/profile_shortcut_manager_win.cc File chrome/browser/profiles/profile_shortcut_manager_win.cc (right): https://codereview.chromium.org/462713002/diff/40001/chrome/browser/profiles/profile_shortcut_manager_win.cc#newcode822 chrome/browser/profiles/profile_shortcut_manager_win.cc:822: params.avatar_image_2x = params.avatar_image_1x; Maybe add ...
6 years, 4 months ago (2014-08-11 20:49:34 UTC) #17
Alexei Svitkine (slow)
https://codereview.chromium.org/462713002/diff/40001/chrome/browser/profiles/profile_shortcut_manager_win.cc File chrome/browser/profiles/profile_shortcut_manager_win.cc (right): https://codereview.chromium.org/462713002/diff/40001/chrome/browser/profiles/profile_shortcut_manager_win.cc#newcode606 chrome/browser/profiles/profile_shortcut_manager_win.cc:606: DCHECK(!image.IsEmpty()); Nit: Move this check to GetSkBitmapCopy() since this ...
6 years, 4 months ago (2014-08-12 14:54:07 UTC) #18
noms (inactive)
https://codereview.chromium.org/462713002/diff/40001/chrome/browser/profiles/profile_shortcut_manager_win.cc File chrome/browser/profiles/profile_shortcut_manager_win.cc (right): https://codereview.chromium.org/462713002/diff/40001/chrome/browser/profiles/profile_shortcut_manager_win.cc#newcode606 chrome/browser/profiles/profile_shortcut_manager_win.cc:606: DCHECK(!image.IsEmpty()); On 2014/08/12 14:54:07, Alexei Svitkine wrote: > Nit: ...
6 years, 4 months ago (2014-08-12 18:52:53 UTC) #19
gab
Very nice, one last question below (still lgtm though) https://codereview.chromium.org/462713002/diff/100001/chrome/browser/profiles/profile_shortcut_manager_win.cc File chrome/browser/profiles/profile_shortcut_manager_win.cc (right): https://codereview.chromium.org/462713002/diff/100001/chrome/browser/profiles/profile_shortcut_manager_win.cc#newcode821 chrome/browser/profiles/profile_shortcut_manager_win.cc:821: ...
6 years, 4 months ago (2014-08-12 18:56:18 UTC) #20
Alexei Svitkine (slow)
lgtm https://codereview.chromium.org/462713002/diff/100001/chrome/browser/profiles/profile_shortcut_manager_win.cc File chrome/browser/profiles/profile_shortcut_manager_win.cc (right): https://codereview.chromium.org/462713002/diff/100001/chrome/browser/profiles/profile_shortcut_manager_win.cc#newcode826 chrome/browser/profiles/profile_shortcut_manager_win.cc:826: DCHECK(image->Width() >= IconUtil::kLargeIconSize); Nit: Can this use DCHECK_GE?
6 years, 4 months ago (2014-08-12 18:57:57 UTC) #21
noms (inactive)
https://codereview.chromium.org/462713002/diff/100001/chrome/browser/profiles/profile_shortcut_manager_win.cc File chrome/browser/profiles/profile_shortcut_manager_win.cc (right): https://codereview.chromium.org/462713002/diff/100001/chrome/browser/profiles/profile_shortcut_manager_win.cc#newcode821 chrome/browser/profiles/profile_shortcut_manager_win.cc:821: cache->GetGAIAPictureOfProfileAtIndex(profile_index); When the file is saved, the ProfileInfoCache sends ...
6 years, 4 months ago (2014-08-12 19:09:58 UTC) #22
noms (inactive)
The CQ bit was checked by noms@chromium.org
6 years, 4 months ago (2014-08-12 21:11:15 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/noms@chromium.org/462713002/120001
6 years, 4 months ago (2014-08-12 21:14:14 UTC) #24
commit-bot: I haz the power
6 years, 4 months ago (2014-08-12 22:52:15 UTC) #25
Message was sent while issue was closed.
Change committed as 289100

Powered by Google App Engine
This is Rietveld 408576698