Skip to content

Commit 9bdbe40

Browse files
author
Jared Saul
committed
[Upstream] Use DISTANCE_BUBBLE_PREFERRED_WIDTH in the credit card upload bubble
Bug: 800997 Change-Id: I568a3038fbc1874a148199daaf1cd5f8b416ef5f Reviewed-on: https://chromium-review.googlesource.com/879170 Reviewed-by: Evan Stade <estade@chromium.org> Commit-Queue: Jared Saul <jsaul@google.com> Cr-Original-Commit-Position: refs/heads/master@{#530996}(cherry picked from commit 8d2fb44) Reviewed-on: https://chromium-review.googlesource.com/884325 Reviewed-by: Jared Saul <jsaul@google.com> Cr-Commit-Position: refs/branch-heads/3325@{#67} Cr-Branched-From: bc084a8-refs/heads/master@{#530369}
1 parent b2f42ba commit 9bdbe40

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

chrome/browser/flag_descriptions.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -288,10 +288,10 @@ const char kEnableAutofillCreditCardUploadCvcPromptDescription[] =
288288
"Google Payments.";
289289

290290
const char kEnableAutofillCreditCardUploadGooglePayBrandingName[] =
291-
"Show the Google Pay logo when offering credit card upload";
291+
"Enable Google Pay branding when offering credit card upload";
292292
const char kEnableAutofillCreditCardUploadGooglePayBrandingDescription[] =
293-
"If enabled, shows the Google Pay logo and a shorter header message when "
294-
"credit card upload to Google Payments is offered.";
293+
"If enabled, shows the Google Pay logo, a shorter header message, and a "
294+
"narrower dialog when credit card upload to Google Payments is offered.";
295295

296296
const char kEnableAutofillCreditCardUploadSendDetectedValuesName[] =
297297
"Always send metadata on detected form values for Autofill credit card "

chrome/browser/ui/views/autofill/save_card_bubble_views.cc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,13 @@ bool SaveCardBubbleViews::IsDialogButtonEnabled(ui::DialogButton button) const {
213213
}
214214

215215
gfx::Size SaveCardBubbleViews::CalculatePreferredSize() const {
216+
if (base::FeatureList::IsEnabled(
217+
features::kAutofillUpstreamUseGooglePayBranding)) {
218+
const int width = ChromeLayoutProvider::Get()->GetDistanceMetric(
219+
DISTANCE_BUBBLE_PREFERRED_WIDTH) -
220+
margins().width();
221+
return gfx::Size(width, GetHeightForWidth(width));
222+
}
216223
return gfx::Size(kBubbleWidth, GetHeightForWidth(kBubbleWidth));
217224
}
218225

0 commit comments

Comments
 (0)