| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/autofill/autofill_field.h" | 5 #include "components/autofill/browser/autofill_field.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/sha1.h" | 8 #include "base/sha1.h" |
| 9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
| 10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| 11 | 11 |
| 12 namespace { | 12 namespace { |
| 13 | 13 |
| 14 static std::string Hash32Bit(const std::string& str) { | 14 static std::string Hash32Bit(const std::string& str) { |
| 15 std::string hash_bin = base::SHA1HashString(str); | 15 std::string hash_bin = base::SHA1HashString(str); |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 | 75 |
| 76 std::string AutofillField::FieldSignature() const { | 76 std::string AutofillField::FieldSignature() const { |
| 77 std::string field_name = UTF16ToUTF8(name); | 77 std::string field_name = UTF16ToUTF8(name); |
| 78 std::string field_string = field_name + "&" + form_control_type; | 78 std::string field_string = field_name + "&" + form_control_type; |
| 79 return Hash32Bit(field_string); | 79 return Hash32Bit(field_string); |
| 80 } | 80 } |
| 81 | 81 |
| 82 bool AutofillField::IsFieldFillable() const { | 82 bool AutofillField::IsFieldFillable() const { |
| 83 return type() != UNKNOWN_TYPE; | 83 return type() != UNKNOWN_TYPE; |
| 84 } | 84 } |
| OLD | NEW |