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

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

Issue 15742018: Omit "Manage your X..." menu model items when user is new. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 7 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
« no previous file with comments | « no previous file | chrome/browser/ui/autofill/autofill_dialog_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « no previous file | chrome/browser/ui/autofill/autofill_dialog_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698