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

Issue 2579623003: [Autofill] Update credit card icons to match payments. (Closed)

Created:
4 years ago by csashi
Modified:
3 years, 11 months ago
CC:
agrieve+watch_chromium.org, browser-components-watch_chromium.org, chromium-reviews, estade+watch_chromium.org, jbudorick+watch_chromium.org, jdonnelly+autofillwatch_chromium.org, mathp+autofillwatch_chromium.org, mikecase+watch_chromium.org, rouslan+autofill_chromium.org, sebsg+autofillwatch_chromium.org, vabr+watchlistautofill_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Update credit card icons to match payments. """ MasterCard recently updated their logo https://brand.mastercard.com/brandcenter/mastercard-brand-mark/downloads.html with these guidelines https://brand.mastercard.com/brandcenter/mastercard-brand-mark.html """ BUG=None New icons are from https://spec.googleplex.com/payments/resources/icons-logos.html#icons-logos-icons Committed: https://crrev.com/1a5cc3aee6308158cf93ac50bbf2dc116cee8ebf Cr-Commit-Position: refs/heads/master@{#439133}

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+769 lines, -33 lines) Patch
M build/android/lint/suppressions.xml View 3 chunks +0 lines, -5 lines 0 comments Download
D chrome/android/java/res/drawable-hdpi/amex_card.png View Binary file 0 comments Download
D chrome/android/java/res/drawable-hdpi/discover_card.png View Binary file 0 comments Download
D chrome/android/java/res/drawable-hdpi/generic_card.png View Binary file 0 comments Download
D chrome/android/java/res/drawable-hdpi/ic_settings.png View Binary file 0 comments Download
D chrome/android/java/res/drawable-hdpi/mc_card.png View Binary file 0 comments Download
D chrome/android/java/res/drawable-hdpi/visa_card.png View Binary file 0 comments Download
D chrome/android/java/res/drawable-mdpi/amex_card.png View Binary file 0 comments Download
D chrome/android/java/res/drawable-mdpi/discover_card.png View Binary file 0 comments Download
D chrome/android/java/res/drawable-mdpi/generic_card.png View Binary file 0 comments Download
D chrome/android/java/res/drawable-mdpi/ic_settings.png View Binary file 0 comments Download
D chrome/android/java/res/drawable-mdpi/mc_card.png View Binary file 0 comments Download
D chrome/android/java/res/drawable-mdpi/visa_card.png View Binary file 0 comments Download
D chrome/android/java/res/drawable-xhdpi/amex_card.png View Binary file 0 comments Download
D chrome/android/java/res/drawable-xhdpi/discover_card.png View Binary file 0 comments Download
D chrome/android/java/res/drawable-xhdpi/generic_card.png View Binary file 0 comments Download
D chrome/android/java/res/drawable-xhdpi/ic_settings.png View Binary file 0 comments Download
D chrome/android/java/res/drawable-xhdpi/mc_card.png View Binary file 0 comments Download
D chrome/android/java/res/drawable-xhdpi/visa_card.png View Binary file 0 comments Download
D chrome/android/java/res/drawable-xxhdpi/amex_card.png View Binary file 0 comments Download
D chrome/android/java/res/drawable-xxhdpi/discover_card.png View Binary file 0 comments Download
D chrome/android/java/res/drawable-xxhdpi/generic_card.png View Binary file 0 comments Download
D chrome/android/java/res/drawable-xxhdpi/ic_settings.png View Binary file 0 comments Download
D chrome/android/java/res/drawable-xxhdpi/mc_card.png View Binary file 0 comments Download
D chrome/android/java/res/drawable-xxhdpi/visa_card.png View Binary file 0 comments Download
D chrome/android/java/res/drawable-xxxhdpi/amex_card.png View Binary file 0 comments Download
D chrome/android/java/res/drawable-xxxhdpi/discover_card.png View Binary file 0 comments Download
D chrome/android/java/res/drawable-xxxhdpi/generic_card.png View Binary file 0 comments Download
D chrome/android/java/res/drawable-xxxhdpi/ic_settings.png View Binary file 0 comments Download
D chrome/android/java/res/drawable-xxxhdpi/mc_card.png View Binary file 0 comments Download
D chrome/android/java/res/drawable-xxxhdpi/visa_card.png View Binary file 0 comments Download
A chrome/android/java/res/drawable/amex_card.xml View 1 chunk +209 lines, -0 lines 0 comments Download
A chrome/android/java/res/drawable/discover_card.xml View 1 chunk +133 lines, -0 lines 0 comments Download
A chrome/android/java/res/drawable/ic_credit_card_black.xml View 1 chunk +26 lines, -0 lines 0 comments Download
A chrome/android/java/res/drawable/ic_info_outline_black.xml View 1 chunk +27 lines, -0 lines 0 comments Download
A chrome/android/java/res/drawable/ic_photo_camera_black.xml View 1 chunk +33 lines, -0 lines 0 comments Download
A chrome/android/java/res/drawable/ic_settings_black.xml View 1 chunk +46 lines, -0 lines 0 comments Download
M chrome/android/java/res/drawable/ic_snippet_thumbnail_placeholder.xml View 1 chunk +3 lines, -0 lines 0 comments Download
A chrome/android/java/res/drawable/ic_warning_black.xml View 1 chunk +25 lines, -0 lines 0 comments Download
A chrome/android/java/res/drawable/mc_card.xml View 1 chunk +168 lines, -0 lines 0 comments Download
A chrome/android/java/res/drawable/visa_card.xml View 1 chunk +60 lines, -0 lines 0 comments Download
M chrome/browser/android/resource_id.h View 1 chunk +15 lines, -9 lines 0 comments Download
M chrome/browser/ui/autofill/autofill_popup_layout_model.cc View 1 chunk +0 lines, -5 lines 0 comments Download
M components/autofill/android/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M components/autofill/android/java/src/org/chromium/components/autofill/AutofillKeyboardAccessory.java View 3 chunks +8 lines, -4 lines 0 comments Download
M components/autofill/android/java/src/org/chromium/components/autofill/AutofillSuggestion.java View 1 chunk +1 line, -1 line 0 comments Download
M components/autofill/core/browser/credit_card.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M components/autofill/core/browser/credit_card_unittest.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M components/resources/autofill_scaled_resources.grdp View 1 chunk +2 lines, -0 lines 0 comments Download
M components/resources/default_100_percent/autofill/amex.png View Binary file 0 comments Download
A components/resources/default_100_percent/autofill/diners.png View Binary file 0 comments Download
M components/resources/default_100_percent/autofill/discover.png View Binary file 0 comments Download
A components/resources/default_100_percent/autofill/jcb.png View Binary file 0 comments Download
M components/resources/default_100_percent/autofill/mastercard.png View Binary file 0 comments Download
M components/resources/default_100_percent/autofill/visa.png View Binary file 0 comments Download
M components/resources/default_200_percent/autofill/amex.png View Binary file 0 comments Download
A components/resources/default_200_percent/autofill/diners.png View Binary file 0 comments Download
M components/resources/default_200_percent/autofill/discover.png View Binary file 0 comments Download
A components/resources/default_200_percent/autofill/jcb.png View Binary file 0 comments Download
M components/resources/default_200_percent/autofill/mastercard.png View Binary file 0 comments Download
M components/resources/default_200_percent/autofill/visa.png View Binary file 0 comments Download
M ui/android/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M ui/android/java/src/org/chromium/ui/DropdownAdapter.java View 2 chunks +4 lines, -2 lines 2 comments Download
M ui/android/java/src/org/chromium/ui/DropdownItem.java View 1 chunk +2 lines, -2 lines 0 comments Download
M ui/android/java/src/org/chromium/ui/DropdownItemBase.java View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 27 (13 generated)
csashi
Hi, This issue is identical to https://codereview.chromium.org/2551683002/ which was reviewed and approved. However, because of ...
4 years ago (2016-12-15 18:26:07 UTC) #3
Mathieu
lgtm
4 years ago (2016-12-15 18:56:26 UTC) #5
David Trainor- moved to gerrit
rubber stamp lgtm.
4 years ago (2016-12-15 19:25:00 UTC) #8
jochen (gone - plz use gerrit)
lgtm
4 years ago (2016-12-16 09:24:34 UTC) #9
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/2579623003/1
4 years ago (2016-12-16 14:38:32 UTC) #12
commit-bot: I haz the power
Try jobs failed on following builders: android_n5x_swarming_rel on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_n5x_swarming_rel/builds/87567)
4 years ago (2016-12-16 16:35:37 UTC) #14
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/2579623003/1
4 years ago (2016-12-16 16:46:00 UTC) #16
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years ago (2016-12-16 17:25:29 UTC) #19
commit-bot: I haz the power
Patchset 1 (id:??) landed as https://crrev.com/1a5cc3aee6308158cf93ac50bbf2dc116cee8ebf Cr-Commit-Position: refs/heads/master@{#439133}
4 years ago (2016-12-16 17:28:30 UTC) #21
Ted C
https://codereview.chromium.org/2579623003/diff/1/ui/android/java/src/org/chromium/ui/DropdownAdapter.java File ui/android/java/src/org/chromium/ui/DropdownAdapter.java (right): https://codereview.chromium.org/2579623003/diff/1/ui/android/java/src/org/chromium/ui/DropdownAdapter.java#newcode179 ui/android/java/src/org/chromium/ui/DropdownAdapter.java:179: iconView.setImageDrawable(VectorDrawableCompat.create(mContext.getResources(), I don't think this was a safe change ...
3 years, 11 months ago (2017-01-03 19:03:38 UTC) #23
csashi
https://codereview.chromium.org/2579623003/diff/1/ui/android/java/src/org/chromium/ui/DropdownAdapter.java File ui/android/java/src/org/chromium/ui/DropdownAdapter.java (right): https://codereview.chromium.org/2579623003/diff/1/ui/android/java/src/org/chromium/ui/DropdownAdapter.java#newcode179 ui/android/java/src/org/chromium/ui/DropdownAdapter.java:179: iconView.setImageDrawable(VectorDrawableCompat.create(mContext.getResources(), On 2017/01/03 19:03:38, Ted C wrote: > I ...
3 years, 11 months ago (2017-01-03 19:32:09 UTC) #24
Ted C
On 2017/01/03 19:32:09, csashi wrote: > https://codereview.chromium.org/2579623003/diff/1/ui/android/java/src/org/chromium/ui/DropdownAdapter.java > File ui/android/java/src/org/chromium/ui/DropdownAdapter.java (right): > > https://codereview.chromium.org/2579623003/diff/1/ui/android/java/src/org/chromium/ui/DropdownAdapter.java#newcode179 > ...
3 years, 11 months ago (2017-01-03 21:01:43 UTC) #25
csashi
On 2017/01/03 21:01:43, Ted C wrote: > On 2017/01/03 19:32:09, csashi wrote: > > > ...
3 years, 11 months ago (2017-01-03 21:09:59 UTC) #26
Ted C
3 years, 11 months ago (2017-01-03 21:24:33 UTC) #27
Message was sent while issue was closed.
On 2017/01/03 21:09:59, csashi wrote:
> On 2017/01/03 21:01:43, Ted C wrote:
> > On 2017/01/03 19:32:09, csashi wrote:
> > >
> >
>
https://codereview.chromium.org/2579623003/diff/1/ui/android/java/src/org/chr...
> > > File ui/android/java/src/org/chromium/ui/DropdownAdapter.java (right):
> > > 
> > >
> >
>
https://codereview.chromium.org/2579623003/diff/1/ui/android/java/src/org/chr...
> > > ui/android/java/src/org/chromium/ui/DropdownAdapter.java:179:
> > >
> iconView.setImageDrawable(VectorDrawableCompat.create(mContext.getResources(),
> > > On 2017/01/03 19:03:38, Ted C wrote:
> > > > I don't think this was a safe change to make.
> > > > 
> > > > In particular, Autofill uses non-vector drawables in their dropdown, and
> > this
> > > at
> > > > a minimum breaks it and could potentially cause a crash if it doesn't
work
> > as
> > > > expected.
> > > > 
> > > > In general, I think you should revert the name back to getIconId() and
> > handle
> > > > vector or not vectors here.
> > > > 
> > > > I "think" this is a way that would inflate a vector drawable or a bitmap
> for
> > > you
> > > > without you having to know the resource type:
> > > > 
> > > >
> > >
> >
>
https://developer.android.com/reference/android/support/v7/content/res/AppCom...,
> > > > int)
> > > 
> > > I switched all the resources Autofill uses to vector drawables. Do you
know
> of
> > > any resource that Autofill uses and is not a vector drawable?
> > 
> > From this code review I got:
> >
>
https://codereview.chromium.org/2548753002/diff/100001/chrome/android/java/sr...
> > 
> > It looks like we use: omnibox_info and omnibox_https_invalid.  Both are
things
> > that are used throughout the code base and I don't think I would recommend
> > switching to vectors (without measuring performance impact).
> 
> I did not switch omnibox icons to vectors because they were used extensively.
I
> switched the use of icons in auto fill code as follows:
> omnibox_info -> ic_info_outline_black.xml
> omnibox_https_invalid -> ic_warning_black.xml

Ah ha...got it.  I see it updated in resource_id.h.  So I guess that should
be fine.

I still don't think we should specify that the drawable id is a vector and
that should be a hidden implementation detail, but that isn't broken and is
a nice to have cleanup.

I don't think vectors support tinting though, so it will likely collide with
the other change but this change didn't break anything.  Sorry for the noise.

Powered by Google App Engine
This is Rietveld 408576698