| Index: components/autofill/core/browser/autofill_field.cc
|
| diff --git a/components/autofill/core/browser/autofill_field.cc b/components/autofill/core/browser/autofill_field.cc
|
| index 403be3659aea8c6111f61545d694d5fff70e6a4f..4dfedc99ad84dcff59ee492fff85fc42f0453a69 100644
|
| --- a/components/autofill/core/browser/autofill_field.cc
|
| +++ b/components/autofill/core/browser/autofill_field.cc
|
| @@ -527,17 +527,6 @@ bool FillExpirationDateInput(const base::string16 &value,
|
| return true;
|
| }
|
|
|
| -std::string Hash32Bit(const std::string& str) {
|
| - std::string hash_bin = base::SHA1HashString(str);
|
| - DCHECK_EQ(base::kSHA1Length, hash_bin.length());
|
| -
|
| - uint32_t hash32 = ((hash_bin[0] & 0xFF) << 24) |
|
| - ((hash_bin[1] & 0xFF) << 16) | ((hash_bin[2] & 0xFF) << 8) |
|
| - (hash_bin[3] & 0xFF);
|
| -
|
| - return base::UintToString(hash32);
|
| -}
|
| -
|
| base::string16 RemoveWhitespace(const base::string16& value) {
|
| base::string16 stripped_value;
|
| base::RemoveChars(value, base::kWhitespaceUTF16, &stripped_value);
|
| @@ -643,10 +632,12 @@ bool AutofillField::IsEmpty() const {
|
| return value.empty();
|
| }
|
|
|
| -std::string AutofillField::FieldSignature() const {
|
| - std::string field_name = base::UTF16ToUTF8(name);
|
| - std::string field_string = field_name + "&" + form_control_type;
|
| - return Hash32Bit(field_string);
|
| +FieldSignature AutofillField::FieldSignature() const {
|
| + return CalculateFieldSignatureByNameAndType(name, form_control_type);
|
| +}
|
| +
|
| +std::string AutofillField::FieldSignatureAsStr() const {
|
| + return base::UintToString(FieldSignature());
|
| }
|
|
|
| bool AutofillField::IsFieldFillable() const {
|
|
|