summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autofill/autofill_profile.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/autofill/autofill_profile.cc')
-rw-r--r--chrome/browser/autofill/autofill_profile.cc14
1 files changed, 10 insertions, 4 deletions
diff --git a/chrome/browser/autofill/autofill_profile.cc b/chrome/browser/autofill/autofill_profile.cc
index 890f726..7a526cc 100644
--- a/chrome/browser/autofill/autofill_profile.cc
+++ b/chrome/browser/autofill/autofill_profile.cc
@@ -219,7 +219,14 @@ void AutofillProfile::SetMultiInfo(AutofillFieldType type,
CopyValuesToItems(type, values, &fax_number_);
break;
default:
- NOTREACHED() << "Attempt to set multiple values on single-valued field.";
+ if (values.size() == 1) {
+ SetInfo(type, values[0]);
+ } else if (values.size() == 0) {
+ SetInfo(type, string16());
+ } else {
+ NOTREACHED()
+ << "Attempt to set multiple values on single-valued field.";
+ }
break;
}
}
@@ -240,9 +247,8 @@ void AutofillProfile::GetMultiInfo(AutofillFieldType type,
CopyItemsToValues(type, fax_number_, values);
break;
default:
- NOTREACHED()
- << "Attempt to get multiple values from a single-valued field.";
- break;
+ values->resize(1);
+ (*values)[0] = GetInfo(type);
}
}