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

Unified Diff: chrome/browser/ui/views/autofill/autofill_dialog_views.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: dont break android 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/views/autofill/autofill_dialog_views.cc
diff --git a/chrome/browser/ui/views/autofill/autofill_dialog_views.cc b/chrome/browser/ui/views/autofill/autofill_dialog_views.cc
index 03e7fc0b6b7fee8a1db88c7cd4417609c13b2ce3..80a84ea13fc7fb2616d770884439974d4d9d6c9d 100644
--- a/chrome/browser/ui/views/autofill/autofill_dialog_views.cc
+++ b/chrome/browser/ui/views/autofill/autofill_dialog_views.cc
@@ -1367,14 +1367,13 @@ void AutofillDialogViews::UpdateDetailsGroupState(const DetailsGroup& group) {
save_in_chrome_checkbox_->SetVisible(
controller_->ShouldOfferToSaveInChrome());
- const bool has_suggestions =
- controller_->MenuModelForSection(group.section)->GetItemCount() > 0;
+ const bool has_menu = !!controller_->MenuModelForSection(group.section);
if (group.suggested_button)
- group.suggested_button->SetVisible(has_suggestions);
+ group.suggested_button->SetVisible(has_menu);
if (group.container) {
- group.container->SetForwardMouseEvents(has_suggestions && show_suggestions);
+ group.container->SetForwardMouseEvents(has_menu && show_suggestions);
group.container->SetVisible(controller_->SectionIsActive(group.section));
}

Powered by Google App Engine
This is Rietveld 408576698