| 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 "chrome/browser/autofill/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/string_number_conversions.h" | 9 #include "base/string_number_conversions.h" |
| 10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 | 67 |
| 68 return heuristic_type_; | 68 return heuristic_type_; |
| 69 } | 69 } |
| 70 | 70 |
| 71 bool AutofillField::IsEmpty() const { | 71 bool AutofillField::IsEmpty() const { |
| 72 return value.empty(); | 72 return value.empty(); |
| 73 } | 73 } |
| 74 | 74 |
| 75 std::string AutofillField::FieldSignature() const { | 75 std::string AutofillField::FieldSignature() const { |
| 76 std::string field_name = UTF16ToUTF8(name); | 76 std::string field_name = UTF16ToUTF8(name); |
| 77 std::string type = UTF16ToUTF8(form_control_type); | 77 std::string field_string = field_name + "&" + form_control_type; |
| 78 std::string field_string = field_name + "&" + type; | |
| 79 return Hash32Bit(field_string); | 78 return Hash32Bit(field_string); |
| 80 } | 79 } |
| 81 | 80 |
| 82 bool AutofillField::IsFieldFillable() const { | 81 bool AutofillField::IsFieldFillable() const { |
| 83 return type() != UNKNOWN_TYPE; | 82 return type() != UNKNOWN_TYPE; |
| 84 } | 83 } |
| OLD | NEW |