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

Unified Diff: components/autofill/core/browser/autofill_external_delegate.cc

Issue 2481493002: [Merge M55] [Autofill] Do not show the credit card promo if there are CC suggestions. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | components/autofill/core/browser/autofill_external_delegate_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/autofill/core/browser/autofill_external_delegate.cc
diff --git a/components/autofill/core/browser/autofill_external_delegate.cc b/components/autofill/core/browser/autofill_external_delegate.cc
index b2f303870de69811d3bd079183d511866fc0b37a..6b04aa5b5733fa0e876d9bb7fe52e030075ccd62 100644
--- a/components/autofill/core/browser/autofill_external_delegate.cc
+++ b/components/autofill/core/browser/autofill_external_delegate.cc
@@ -108,8 +108,9 @@ void AutofillExternalDelegate::OnSuggestionsReturned(
if (has_autofill_suggestions_)
ApplyAutofillOptions(&suggestions);
- // Append the credit card signin promo, if appropriate.
- if (should_show_cc_signin_promo_) {
+ // Append the credit card signin promo, if appropriate (there are no other
+ // suggestions).
+ if (suggestions.empty() && should_show_cc_signin_promo_) {
// No separator on Android.
#if !defined(OS_ANDROID)
// If there are autofill suggestions, the "Autofill options" row was added
« no previous file with comments | « no previous file | components/autofill/core/browser/autofill_external_delegate_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698