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

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

Issue 23579009: [rAc] Move email address into billing address section. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Include email address in suggestion preview text, fix some compile errors (unittests need more fixi… Created 7 years, 3 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_common.cc
diff --git a/chrome/browser/ui/autofill/autofill_dialog_common.cc b/chrome/browser/ui/autofill/autofill_dialog_common.cc
index 4cb8cd3826f4276d57f7de3c1267f65be375cfe7..5638615709786e7c4cf72700d0657fa4f64f209f 100644
--- a/chrome/browser/ui/autofill/autofill_dialog_common.cc
+++ b/chrome/browser/ui/autofill/autofill_dialog_common.cc
@@ -72,35 +72,32 @@ void BuildInputs(const DetailInput* input_template,
// Constructs |inputs| from template data for a given |dialog_section|.
void BuildInputsForSection(DialogSection dialog_section,
DetailInputs* inputs) {
- const DetailInput kEmailInputs[] = {
- { 1, EMAIL_ADDRESS, IDS_AUTOFILL_DIALOG_PLACEHOLDER_EMAIL },
- };
-
const DetailInput kCCInputs[] = {
- { 2, CREDIT_CARD_NUMBER, IDS_AUTOFILL_DIALOG_PLACEHOLDER_CARD_NUMBER },
- { 3, CREDIT_CARD_EXP_MONTH, IDS_AUTOFILL_DIALOG_PLACEHOLDER_EXPIRY_MONTH },
- { 3, CREDIT_CARD_EXP_4_DIGIT_YEAR,
+ { 1, CREDIT_CARD_NUMBER, IDS_AUTOFILL_DIALOG_PLACEHOLDER_CARD_NUMBER },
+ { 2, CREDIT_CARD_EXP_MONTH, IDS_AUTOFILL_DIALOG_PLACEHOLDER_EXPIRY_MONTH },
+ { 2, CREDIT_CARD_EXP_4_DIGIT_YEAR,
IDS_AUTOFILL_DIALOG_PLACEHOLDER_EXPIRY_YEAR },
- { 3, CREDIT_CARD_VERIFICATION_CODE, IDS_AUTOFILL_DIALOG_PLACEHOLDER_CVC,
+ { 2, CREDIT_CARD_VERIFICATION_CODE, IDS_AUTOFILL_DIALOG_PLACEHOLDER_CVC,
1.5 },
};
const DetailInput kBillingInputs[] = {
- { 4, NAME_BILLING_FULL, IDS_AUTOFILL_DIALOG_PLACEHOLDER_CARDHOLDER_NAME },
- { 5, ADDRESS_BILLING_LINE1,
+ { 3, NAME_BILLING_FULL, IDS_AUTOFILL_DIALOG_PLACEHOLDER_CARDHOLDER_NAME },
+ { 4, ADDRESS_BILLING_LINE1,
IDS_AUTOFILL_DIALOG_PLACEHOLDER_ADDRESS_LINE_1 },
- { 6, ADDRESS_BILLING_LINE2,
+ { 5, ADDRESS_BILLING_LINE2,
IDS_AUTOFILL_DIALOG_PLACEHOLDER_ADDRESS_LINE_2 },
- { 7, ADDRESS_BILLING_CITY,
+ { 6, ADDRESS_BILLING_CITY,
IDS_AUTOFILL_DIALOG_PLACEHOLDER_LOCALITY },
// TODO(estade): state placeholder should depend on locale.
- { 8, ADDRESS_BILLING_STATE, IDS_AUTOFILL_FIELD_LABEL_STATE },
- { 8, ADDRESS_BILLING_ZIP,
+ { 7, ADDRESS_BILLING_STATE, IDS_AUTOFILL_FIELD_LABEL_STATE },
+ { 7, ADDRESS_BILLING_ZIP,
IDS_AUTOFILL_DIALOG_PLACEHOLDER_POSTAL_CODE },
// We don't allow the user to change the country: http://crbug.com/247518
{ -1, ADDRESS_BILLING_COUNTRY, 0 },
- { 10, PHONE_BILLING_WHOLE_NUMBER,
+ { 9, PHONE_BILLING_WHOLE_NUMBER,
IDS_AUTOFILL_DIALOG_PLACEHOLDER_PHONE_NUMBER },
+ { 10, EMAIL_ADDRESS, IDS_AUTOFILL_DIALOG_PLACEHOLDER_EMAIL },
};
const DetailInput kShippingInputs[] = {
@@ -116,12 +113,6 @@ void BuildInputsForSection(DialogSection dialog_section,
};
switch (dialog_section) {
- case SECTION_EMAIL:
- BuildInputs(kEmailInputs,
- arraysize(kEmailInputs),
- inputs);
- break;
-
case SECTION_CC:
BuildInputs(kCCInputs,
arraysize(kCCInputs),
@@ -139,7 +130,7 @@ void BuildInputsForSection(DialogSection dialog_section,
arraysize(kCCInputs),
inputs);
BuildInputs(kBillingInputs,
- arraysize(kBillingInputs),
+ arraysize(kBillingInputs) - 1, // Skip the email field.
Evan Stade 2013/09/05 16:54:09 hmmm, maybe it would be cleaner to add the email i
Ilya Sherman 2013/09/06 04:16:05 Done.
inputs);
break;
@@ -154,9 +145,6 @@ void BuildInputsForSection(DialogSection dialog_section,
AutofillMetrics::DialogUiEvent DialogSectionToUiEditEvent(
DialogSection section) {
switch (section) {
- case SECTION_EMAIL:
- return AutofillMetrics::DIALOG_UI_EMAIL_EDIT_UI_SHOWN;
-
case SECTION_BILLING:
return AutofillMetrics::DIALOG_UI_BILLING_EDIT_UI_SHOWN;
@@ -177,9 +165,6 @@ AutofillMetrics::DialogUiEvent DialogSectionToUiEditEvent(
AutofillMetrics::DialogUiEvent DialogSectionToUiItemAddedEvent(
DialogSection section) {
switch (section) {
- case SECTION_EMAIL:
- return AutofillMetrics::DIALOG_UI_EMAIL_ITEM_ADDED;
-
case SECTION_BILLING:
return AutofillMetrics::DIALOG_UI_BILLING_ITEM_ADDED;
@@ -200,9 +185,6 @@ AutofillMetrics::DialogUiEvent DialogSectionToUiItemAddedEvent(
AutofillMetrics::DialogUiEvent DialogSectionToUiSelectionChangedEvent(
DialogSection section) {
switch (section) {
- case SECTION_EMAIL:
- return AutofillMetrics::DIALOG_UI_EMAIL_SELECTED_SUGGESTION_CHANGED;
-
case SECTION_BILLING:
return AutofillMetrics::DIALOG_UI_BILLING_SELECTED_SUGGESTION_CHANGED;

Powered by Google App Engine
This is Rietveld 408576698