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 "components/autofill/browser/autofill_field.h" | 5 #include "components/autofill/core/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/strings/utf_string_conversions.h" | 10 #include "base/strings/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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 std::string field_name = UTF16ToUTF8(name); | 79 std::string field_name = UTF16ToUTF8(name); |
80 std::string field_string = field_name + "&" + form_control_type; | 80 std::string field_string = field_name + "&" + form_control_type; |
81 return Hash32Bit(field_string); | 81 return Hash32Bit(field_string); |
82 } | 82 } |
83 | 83 |
84 bool AutofillField::IsFieldFillable() const { | 84 bool AutofillField::IsFieldFillable() const { |
85 return type() != UNKNOWN_TYPE; | 85 return type() != UNKNOWN_TYPE; |
86 } | 86 } |
87 | 87 |
88 } // namespace autofill | 88 } // namespace autofill |
OLD | NEW |