| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_DATA_UTIL_H_ | 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_DATA_UTIL_H_ |
| 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_DATA_UTIL_H_ | 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_DATA_UTIL_H_ |
| 7 | 7 |
| 8 #include "base/strings/string16.h" | 8 #include "base/strings/string16.h" |
| 9 #include "components/autofill/core/browser/autofill_profile.h" |
| 9 | 10 |
| 10 namespace autofill { | 11 namespace autofill { |
| 11 namespace data_util { | 12 namespace data_util { |
| 12 | 13 |
| 13 struct NameParts { | 14 struct NameParts { |
| 14 base::string16 given; | 15 base::string16 given; |
| 15 base::string16 middle; | 16 base::string16 middle; |
| 16 base::string16 family; | 17 base::string16 family; |
| 17 }; | 18 }; |
| 18 | 19 |
| 19 // TODO(crbug.com/586510): Investigate the use of app_locale to do better name | 20 // TODO(crbug.com/586510): Investigate the use of app_locale to do better name |
| 20 // splitting. | 21 // splitting. |
| 21 // Returns the different name parts (given, middle and family names) of the full | 22 // Returns the different name parts (given, middle and family names) of the full |
| 22 // |name| passed as a parameter. | 23 // |name| passed as a parameter. |
| 23 NameParts SplitName(const base::string16& name); | 24 NameParts SplitName(const base::string16& name); |
| 24 | 25 |
| 26 // Returns true iff |full_name| is a concatenation of some combination of the |
| 27 // first/middle/last (incl. middle initial) in |profile|. |
| 28 bool ProfileMatchesFullName(const base::string16 full_name, |
| 29 const autofill::AutofillProfile& profile); |
| 30 |
| 25 } // namespace data_util | 31 } // namespace data_util |
| 26 } // namespace autofill | 32 } // namespace autofill |
| 27 | 33 |
| 28 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_DATA_UTIL_H_ | 34 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_DATA_UTIL_H_ |
| OLD | NEW |