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 59bf9eaa35bd0d0af5ae678e6afe085c11bf0612..e5353bde0616caa3de6a0c8a98c7b52eb1a42619 100644 |
--- a/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc |
+++ b/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc |
@@ -1837,10 +1837,13 @@ 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_ || |
Evan Stade
2013/05/23 16:32:12
don't need to check wallet_items_ imo --- several
Dan Beam
2013/05/23 19:31:16
Done. (didn't see the IsPayingWithWallet() above)
|
+ !wallet_items_->HasRequiredAction(wallet::SETUP_WALLET)) { |
+ suggested_cc_billing_.AddKeyedItem( |
+ kManageItemsKey, |
+ l10n_util::GetStringUTF16( |
+ IDS_AUTOFILL_DIALOG_MANAGE_BILLING_DETAILS)); |
+ } |
} |
} else { |
PersonalDataManager* manager = GetManager(); |
@@ -1902,9 +1905,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 |