Index: chrome/browser/ui/autofill/autofill_dialog_models.cc |
diff --git a/chrome/browser/ui/autofill/autofill_dialog_models.cc b/chrome/browser/ui/autofill/autofill_dialog_models.cc |
index 78d7d35aa792fe7427dd444487c760d40e2b0436..f4ee2a19e181cbdaa0edb997259375a7f7368476 100644 |
--- a/chrome/browser/ui/autofill/autofill_dialog_models.cc |
+++ b/chrome/browser/ui/autofill/autofill_dialog_models.cc |
@@ -150,19 +150,20 @@ void AccountChooserModel::ExecuteCommand(int command_id, int event_flags) { |
if (checked_item_ == command_id) |
return; |
+ prefs_->SetBoolean(prefs::kAutofillDialogPayWithoutWallet, |
Dan Beam
2013/04/05 02:45:57
should this model know about prefs?
aruslan
2013/04/05 03:45:35
I'd rather didn't pretend the account chooser know
|
+ command_id == kAutofillItemId); |
+ |
checked_item_ = command_id; |
account_delegate_->AccountChoiceChanged(); |
} |
void AccountChooserModel::SetHadWalletError() { |
had_wallet_error_ = true; |
- checked_item_ = kAutofillItemId; |
- account_delegate_->AccountChoiceChanged(); |
+ ExecuteCommand(kAutofillItemId, 0); |
} |
void AccountChooserModel::SetHadWalletSigninError() { |
- checked_item_ = kAutofillItemId; |
- account_delegate_->AccountChoiceChanged(); |
+ ExecuteCommand(kAutofillItemId, 0); |
} |
bool AccountChooserModel::WalletIsSelected() const { |
@@ -170,7 +171,7 @@ bool AccountChooserModel::WalletIsSelected() const { |
} |
void AccountChooserModel::PrefChanged(const std::string& pref) { |
- DCHECK(pref == prefs::kAutofillDialogPayWithoutWallet); |
+ DCHECK_EQ(pref, prefs::kAutofillDialogPayWithoutWallet); |
UpdateCheckmarkFromPref(); |
account_delegate_->AccountChoiceChanged(); |
} |