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

Side by Side Diff: components/autofill/core/browser/autofill_data_util.h

Issue 1868003003: Preserving first/middle/last names when an Autofill profile is submitted (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing stevenjb nits Created 4 years, 8 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
OLDNEW
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_
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/options/autofill_options_handler.cc ('k') | components/autofill/core/browser/autofill_data_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698