Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(185)

Side by Side Diff: components/autofill/browser/autofill_field.cc

Issue 12434004: Move remaining Autofill code to //components/autofill. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix long lines Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « components/autofill/browser/autofill_field.h ('k') | components/autofill/browser/autofill_field_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698