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

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

Issue 157093002: rAc - hardcode wallet billing address to US in i18n mode (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 6 years, 10 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
« no previous file with comments | « chrome/browser/ui/autofill/autofill_dialog_controller_impl.h ('k') | no next file » | 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 26aa4eaa3a9b91b6361b86e5ee8c5f2018eb39be..2228ccbaa2c1f53aa32384580f318ec872cb6f4d 100644
--- a/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc
+++ b/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc
@@ -1165,8 +1165,10 @@ void AutofillDialogControllerImpl::ResetSectionInput(DialogSection section) {
}
DetailInputs* inputs = MutableRequestedFieldsForSection(section);
- for (DetailInputs::iterator it = inputs->begin(); it != inputs->end(); ++it) {
- it->initial_value = common::GetHardcodedValueForType(it->type);
+ for (DetailInputs::iterator it = inputs->begin();
+ it != inputs->end(); ++it) {
+ if (it->length != DetailInput::NONE)
+ it->initial_value = common::GetHardcodedValueForType(it->type);
}
}
@@ -1250,8 +1252,10 @@ void AutofillDialogControllerImpl::RestoreUserInputFromSnapshot(
DetailInputs* inputs = MutableRequestedFieldsForSection(section);
for (size_t i = 0; i < inputs->size(); ++i) {
DetailInput* input = &(*inputs)[i];
- input->initial_value =
- GetInfoFromInputs(snapshot, section, AutofillType(input->type));
+ if (input->length != DetailInput::NONE) {
+ input->initial_value =
+ GetInfoFromInputs(snapshot, section, AutofillType(input->type));
+ }
if (InputWasEdited(input->type, input->initial_value))
SuggestionsMenuModelForSection(section)->SetCheckedItem(kAddNewItemKey);
}
@@ -3001,12 +3005,12 @@ void AutofillDialogControllerImpl::SuggestionsUpdated() {
FieldValueMap::const_iterator billing_it =
snapshot.find(ADDRESS_BILLING_COUNTRY);
if (billing_it != snapshot.end())
- RebuildInputsForCountry(ActiveBillingSection(), billing_it->second, false);
+ RebuildInputsForCountry(ActiveBillingSection(), billing_it->second, true);
FieldValueMap::const_iterator shipping_it =
snapshot.find(ADDRESS_HOME_COUNTRY);
if (shipping_it != snapshot.end())
- RebuildInputsForCountry(SECTION_SHIPPING, shipping_it->second, false);
+ RebuildInputsForCountry(SECTION_SHIPPING, shipping_it->second, true);
RestoreUserInputFromSnapshot(snapshot);
@@ -3180,7 +3184,7 @@ DialogSection AutofillDialogControllerImpl::SectionForSuggestionsMenuModel(
CountryComboboxModel* AutofillDialogControllerImpl::
CountryComboboxModelForSection(DialogSection section) {
- if (section == SECTION_BILLING || section == SECTION_CC_BILLING)
+ if (section == SECTION_BILLING)
return &billing_country_combobox_model_;
if (section == SECTION_SHIPPING)
« no previous file with comments | « chrome/browser/ui/autofill/autofill_dialog_controller_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698