| 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 be956b080d1fcb171024d82b2a94c468121953ad..dc0c0fe2acbb6b1e0f1c5d06e380cbfb74967507 100644
|
| --- a/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc
|
| +++ b/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc
|
| @@ -687,8 +687,27 @@ ui::ComboboxModel* AutofillDialogControllerImpl::ComboboxModelForAutofillType(
|
|
|
| ui::MenuModel* AutofillDialogControllerImpl::MenuModelForSection(
|
| DialogSection section) {
|
| + SuggestionsMenuModel* model = SuggestionsMenuModelForSection(section);
|
| + // The shipping section menu is special. It will always show because there is
|
| + // a choice between "Use billing" and "enter new".
|
| + if (section == SECTION_SHIPPING)
|
| + return model;
|
| +
|
| + // For other sections, only show a menu if there's at least one suggestion.
|
| + for (int i = 0; i < model->GetItemCount(); ++i) {
|
| + if (IsASuggestionItemKey(model->GetItemKeyAt(i)))
|
| + return model;
|
| + }
|
| +
|
| + return NULL;
|
| +}
|
| +
|
| +#if defined(OS_ANDROID)
|
| +ui::MenuModel* AutofillDialogControllerImpl::MenuModelForSectionHack(
|
| + DialogSection section) {
|
| return SuggestionsMenuModelForSection(section);
|
| }
|
| +#endif
|
|
|
| ui::MenuModel* AutofillDialogControllerImpl::MenuModelForAccountChooser() {
|
| // If there were unrecoverable Wallet errors, or if there are choices other
|
|
|