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

Unified Diff: chrome/browser/autofill/contact_info.cc

Issue 2849008: AutoFill duplicate NAME_FULL checks. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Created 10 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autofill/contact_info.cc
diff --git a/chrome/browser/autofill/contact_info.cc b/chrome/browser/autofill/contact_info.cc
index 3c77cdada72eac6a972174c9c65885172beef23e..0355fd0728f181163b542656708d6ce837017af2 100644
--- a/chrome/browser/autofill/contact_info.cc
+++ b/chrome/browser/autofill/contact_info.cc
@@ -112,27 +112,7 @@ void ContactInfo::SetInfo(const AutoFillType& type, const string16& value) {
SetLast(value);
else if (field_type == NAME_SUFFIX)
set_suffix(value);
- else if (field_type == NAME_FULL) {
- // TODO(dhollowa): This needs formal spec on how names are split from
- // unstructured string to structured fields.
- std::vector<string16> values;
- SplitStringAlongWhitespace(value, &values);
- if (values.size() == 1) {
- SetInfo(AutoFillType(NAME_FIRST), values[0]);
- } else if (values.size() == 2) {
- SetInfo(AutoFillType(NAME_FIRST), values[0]);
- SetInfo(AutoFillType(NAME_LAST), values[1]);
- } else if (values.size() == 3) {
- SetInfo(AutoFillType(NAME_FIRST), values[0]);
- SetInfo(AutoFillType(NAME_MIDDLE), values[1]);
- SetInfo(AutoFillType(NAME_LAST), values[2]);
- } else if (values.size() >= 4) {
- SetInfo(AutoFillType(NAME_FIRST), values[0]);
- SetInfo(AutoFillType(NAME_MIDDLE), values[1]);
- SetInfo(AutoFillType(NAME_LAST), values[2]);
- SetInfo(AutoFillType(NAME_SUFFIX), values[3]);
- }
- } else if (field_type == EMAIL_ADDRESS)
+ else if (field_type == EMAIL_ADDRESS)
email_ = value;
else if (field_type == COMPANY_NAME)
company_name_ = value;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698