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

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

Issue 100743006: Fix DCHECK() when updating instruments with no phone number. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: dcheck Created 7 years 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 1cfd4e763debe5856ca32bd8693ff13e8d6ee463..f0111602992b0ba8231cec2f1c2c919cee70c473 100644
--- a/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc
+++ b/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc
@@ -3163,10 +3163,6 @@ void AutofillDialogControllerImpl::SubmitWithWallet() {
scoped_ptr<wallet::Instrument> inputted_instrument =
CreateTransientInstrument();
- if (inputted_instrument && IsEditingExistingData(SECTION_CC_BILLING)) {
- inputted_instrument->set_object_id(active_instrument->object_id());
- DCHECK(!inputted_instrument->object_id().empty());
- }
scoped_ptr<wallet::Address> inputted_address;
if (active_address_id_.empty() && IsShippingAddressRequired()) {
@@ -3186,10 +3182,6 @@ void AutofillDialogControllerImpl::SubmitWithWallet() {
}
} else {
inputted_address = CreateTransientAddress();
- if (IsEditingExistingData(SECTION_SHIPPING)) {
- inputted_address->set_object_id(active_address->object_id());
- DCHECK(!inputted_address->object_id().empty());
- }
}
}
@@ -3201,8 +3193,11 @@ void AutofillDialogControllerImpl::SubmitWithWallet() {
return;
}
- GetWalletClient()->SaveToWallet(inputted_instrument.Pass(),
- inputted_address.Pass());
+ GetWalletClient()->SaveToWallet(
+ inputted_instrument.Pass(),
+ inputted_address.Pass(),
+ IsEditingExistingData(SECTION_CC_BILLING) ? active_instrument : NULL,
+ IsEditingExistingData(SECTION_SHIPPING) ? active_address : NULL);
}
scoped_ptr<wallet::Instrument> AutofillDialogControllerImpl::

Powered by Google App Engine
This is Rietveld 408576698