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

Unified Diff: components/autofill/core/browser/autofill_profile.h

Issue 347183005: autofill names - dont parse when calling SetRawInfo(FULL_NAME) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix android test expectation Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: components/autofill/core/browser/autofill_profile.h
diff --git a/components/autofill/core/browser/autofill_profile.h b/components/autofill/core/browser/autofill_profile.h
index 7ae95722a1d33408f53235d6012229968359407e..4e3f0638baee46550a1c5139c6649a44fe1d5906 100644
--- a/components/autofill/core/browser/autofill_profile.h
+++ b/components/autofill/core/browser/autofill_profile.h
@@ -123,6 +123,7 @@ class AutofillProfile : public AutofillDataModel {
// 5. Company name.
static void CreateDifferentiatingLabels(
const std::vector<AutofillProfile*>& profiles,
+ const std::string& app_locale,
std::vector<base::string16>* labels);
// Creates inferred labels for |profiles|, according to the rules above and
@@ -137,6 +138,7 @@ class AutofillProfile : public AutofillDataModel {
const std::vector<ServerFieldType>* suggested_fields,
ServerFieldType excluded_field,
size_t minimal_fields_shown,
+ const std::string& app_locale,
std::vector<base::string16>* labels);
const std::string& language_code() const { return language_code_; }
@@ -158,20 +160,13 @@ class AutofillProfile : public AutofillDataModel {
const std::string& app_locale,
std::vector<base::string16>* values) const;
- // Checks if the |phone| is in the |existing_phones| using fuzzy matching:
- // for example, "1-800-FLOWERS", "18003569377", "(800)356-9377" and "356-9377"
- // are considered the same.
- // Adds the |phone| to the |existing_phones| if not already there.
- void AddPhoneIfUnique(const base::string16& phone,
- const std::string& app_locale,
- std::vector<base::string16>* existing_phones);
-
// Builds inferred label from the first |num_fields_to_include| non-empty
// fields in |label_fields|. Uses as many fields as possible if there are not
// enough non-empty fields.
base::string16 ConstructInferredLabel(
const std::vector<ServerFieldType>& label_fields,
- size_t num_fields_to_include) const;
+ size_t num_fields_to_include,
+ const std::string& app_locale) const;
// Creates inferred labels for |profiles| at indices corresponding to
// |indices|, and stores the results to the corresponding elements of
@@ -183,6 +178,7 @@ class AutofillProfile : public AutofillDataModel {
const std::list<size_t>& indices,
const std::vector<ServerFieldType>& fields,
size_t num_fields_to_include,
+ const std::string& app_locale,
std::vector<base::string16>* labels);
// Utilities for listing and lookup of the data members that constitute
@@ -195,7 +191,8 @@ class AutofillProfile : public AutofillDataModel {
// duplicates. If a name in |names| has the same full name representation
// as a name in |name_|, keeps the variant that has more information (i.e.
// is not reconstructible via a heuristic parse of the full name string).
- void OverwriteOrAppendNames(const std::vector<NameInfo>& names);
+ void OverwriteOrAppendNames(const std::vector<NameInfo>& names,
+ const std::string& app_locale);
// Personal information for this profile.
std::vector<NameInfo> name_;
« no previous file with comments | « components/autofill/core/browser/autofill_manager_unittest.cc ('k') | components/autofill/core/browser/autofill_profile.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698