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

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: estade@ review 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
« no previous file with comments | « no previous file | chrome/browser/ui/autofill/autofill_dialog_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 b4e632c3a95ee2944b37638dd5a089f416a2b896..a320084dba509505da6d54deb3c69e741fc18e67 100644
--- a/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc
+++ b/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc
@@ -3172,10 +3172,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()) {
@@ -3195,10 +3191,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());
- }
}
}
@@ -3210,8 +3202,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::
« no previous file with comments | « no previous file | chrome/browser/ui/autofill/autofill_dialog_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698