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

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

Issue 13625002: Change the behavior of the [X] Save details to Wallet checkbox notification to: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . 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/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();
}

Powered by Google App Engine
This is Rietveld 408576698