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

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
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

Powered by Google App Engine
This is Rietveld 408576698