Index: chrome/browser/ui/autofill/account_chooser_model.cc |
diff --git a/chrome/browser/ui/autofill/account_chooser_model.cc b/chrome/browser/ui/autofill/account_chooser_model.cc |
index 3c3bcb010596f75eabcf6ffa67fa1d4acdbae093..8980c906a3de3ebdaa7e0a2d2d9bc617c9bf3627 100644 |
--- a/chrome/browser/ui/autofill/account_chooser_model.cc |
+++ b/chrome/browser/ui/autofill/account_chooser_model.cc |
@@ -34,6 +34,7 @@ AccountChooserModel::AccountChooserModel( |
checked_item_( |
prefs->GetBoolean(::prefs::kAutofillDialogPayWithoutWallet) ? |
kAutofillItemId : kActiveWalletItemId), |
+ had_wallet_error_(false), |
metric_logger_(metric_logger), |
dialog_type_(dialog_type) { |
ReconstructMenuItems(); |
@@ -73,7 +74,7 @@ bool AccountChooserModel::IsCommandIdChecked(int command_id) const { |
bool AccountChooserModel::IsCommandIdEnabled(int command_id) const { |
// Currently, _any_ (non-sign-in) error disables _all_ Wallet accounts. |
- if (command_id != kAutofillItemId && HadWalletError()) |
+ if (command_id != kAutofillItemId && had_wallet_error_) |
return false; |
return true; |
@@ -108,17 +109,13 @@ void AccountChooserModel::ExecuteCommand(int command_id, int event_flags) { |
delegate_->AccountChoiceChanged(); |
} |
-void AccountChooserModel::SetHadWalletError(const base::string16& message) { |
+void AccountChooserModel::SetHadWalletError() { |
// Any non-sign-in error disables all Wallet accounts. |
- wallet_error_message_ = message; |
+ had_wallet_error_ = true; |
ClearActiveWalletAccountName(); |
ExecuteCommand(kAutofillItemId, 0); |
} |
-bool AccountChooserModel::HadWalletError() const { |
- return !wallet_error_message_.empty(); |
-} |
- |
void AccountChooserModel::SetHadWalletSigninError() { |
ClearActiveWalletAccountName(); |
ExecuteCommand(kAutofillItemId, 0); |