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

Unified Diff: chrome/browser/autofill/autofill_profile.h

Issue 6877130: These changes *are* for review :) (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 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
« no previous file with comments | « chrome/browser/autofill/autofill_manager_unittest.cc ('k') | chrome/browser/autofill/autofill_profile.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autofill/autofill_profile.h
===================================================================
--- chrome/browser/autofill/autofill_profile.h (revision 85992)
+++ chrome/browser/autofill/autofill_profile.h (working copy)
@@ -119,6 +119,13 @@
// aid with correct aggregation of new data.
const string16 PrimaryValue() const;
+ // Normalizes the home phone and fax numbers.
+ // Should be called after all of the form data is imported into profile.
+ // Drops unparsable numbers, so the numbers that are incomplete or wrong
+ // are not saved. Returns true if all numbers were successfully parsed,
+ // false otherwise.
+ bool NormalizePhones();
+
// Overwrites the single-valued field data in |profile| with this
// Profile. Or, for multi-valued fields append the new values.
void OverwriteWithOrAddTo(const AutofillProfile& profile);
@@ -126,6 +133,13 @@
private:
typedef std::vector<const FormGroup*> FormGroupList;
+ // 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 string16& phone,
+ std::vector<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.
@@ -161,8 +175,8 @@
std::vector<NameInfo> name_;
std::vector<EmailInfo> email_;
CompanyInfo company_;
- std::vector<HomePhoneNumber> home_number_;
- std::vector<FaxNumber> fax_number_;
+ std::vector<PhoneNumber> home_number_;
+ std::vector<PhoneNumber> fax_number_;
Address address_;
};
« no previous file with comments | « chrome/browser/autofill/autofill_manager_unittest.cc ('k') | chrome/browser/autofill/autofill_profile.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698