Index: chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc |
diff --git a/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc b/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc |
index f6a40c6ea0e5c136ad09e43b6d2f13092fd048ce..acb018122ddf62e20065107a7d799a02495850e5 100644 |
--- a/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc |
+++ b/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc |
@@ -1885,10 +1885,12 @@ void AutofillDialogControllerImpl::SuggestionsUpdated() { |
suggested_cc_billing_.AddKeyedItem( |
kAddNewItemKey, |
l10n_util::GetStringUTF16(IDS_AUTOFILL_DIALOG_ADD_BILLING_DETAILS)); |
- suggested_cc_billing_.AddKeyedItem( |
- kManageItemsKey, |
- l10n_util::GetStringUTF16( |
- IDS_AUTOFILL_DIALOG_MANAGE_BILLING_DETAILS)); |
+ if (!wallet_items_->HasRequiredAction(wallet::SETUP_WALLET)) { |
+ suggested_cc_billing_.AddKeyedItem( |
+ kManageItemsKey, |
+ l10n_util::GetStringUTF16( |
+ IDS_AUTOFILL_DIALOG_MANAGE_BILLING_DETAILS)); |
+ } |
// Determine which instrument item should be selected. |
if (!default_instrument_key.empty()) |
@@ -1961,9 +1963,12 @@ void AutofillDialogControllerImpl::SuggestionsUpdated() { |
suggested_shipping_.AddKeyedItem( |
kAddNewItemKey, |
l10n_util::GetStringUTF16(IDS_AUTOFILL_DIALOG_ADD_SHIPPING_ADDRESS)); |
- suggested_shipping_.AddKeyedItem( |
- kManageItemsKey, |
- l10n_util::GetStringUTF16(IDS_AUTOFILL_DIALOG_MANAGE_SHIPPING_ADDRESS)); |
+ if (!IsPayingWithWallet() || |
+ !wallet_items_->HasRequiredAction(wallet::SETUP_WALLET)) { |
+ suggested_shipping_.AddKeyedItem( |
+ kManageItemsKey, |
+ l10n_util::GetStringUTF16(IDS_AUTOFILL_DIALOG_MANAGE_SHIPPING_ADDRESS)); |
+ } |
if (!IsPayingWithWallet()) { |
// When using Autofill, the default option is the first suggestion, if |