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

Unified Diff: chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc

Issue 14571003: Don't display drop down arrows in rAc dialog unless there is a suggestion (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update tests Created 7 years, 8 months 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
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 2cf3af3f1319541e9a65db5a543a72ecf92be3b8..1c3fc0be9220fa46b83183fd26317b05e8a06b50 100644
--- a/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc
+++ b/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc
@@ -687,7 +687,19 @@ ui::ComboboxModel* AutofillDialogControllerImpl::ComboboxModelForAutofillType(
ui::MenuModel* AutofillDialogControllerImpl::MenuModelForSection(
DialogSection section) {
- return SuggestionsMenuModelForSection(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;
aruslan 2013/04/30 16:37:28 On Android the editing form is shown only when the
}
ui::MenuModel* AutofillDialogControllerImpl::MenuModelForAccountChooser() {

Powered by Google App Engine
This is Rietveld 408576698