diff options
author | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-03 01:57:07 +0000 |
---|---|---|
committer | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-03 01:57:07 +0000 |
commit | 877535175434bbf768234d10cd6df8085e707381 (patch) | |
tree | 0c08a136830a80ec63dbe6a3368cb88de4224781 /chrome/browser/autofill/contact_info.h | |
parent | 1314544e05b07de2bfba8c91eff32fa127dca815 (diff) | |
download | chromium_src-877535175434bbf768234d10cd6df8085e707381.zip chromium_src-877535175434bbf768234d10cd6df8085e707381.tar.gz chromium_src-877535175434bbf768234d10cd6df8085e707381.tar.bz2 |
Where possible, use return-by-const-ref for accessors in AutoFill data structures. In addition, I fixed the access levels of many of the modified methods.
BUG=31775
TEST=none
Review URL: http://codereview.chromium.org/661421
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40477 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autofill/contact_info.h')
-rw-r--r-- | chrome/browser/autofill/contact_info.h | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/chrome/browser/autofill/contact_info.h b/chrome/browser/autofill/contact_info.h index 957e55e..adbc66a 100644 --- a/chrome/browser/autofill/contact_info.h +++ b/chrome/browser/autofill/contact_info.h @@ -27,21 +27,24 @@ class ContactInfo : public FormGroup { virtual string16 GetFieldText(const AutoFillType& type) const; virtual void SetInfo(const AutoFillType& type, const string16& value); + private: + explicit ContactInfo(const ContactInfo& contact_info); + void operator=(const ContactInfo& info); + // Returns the full name, which can include up to the first, middle, middle // initial, last name, and suffix. string16 FullName() const; - string16 first() const { return first_; } - string16 middle() const { return middle_; } - string16 last() const { return last_; } + // Returns the middle initial if |middle_| is non-empty. Returns an empty + // string otherwise. string16 MiddleInitial() const; - string16 suffix() const { return suffix_; } - string16 email() const { return email_; } - string16 company_name() const { return company_name_; } - private: - explicit ContactInfo(const ContactInfo& contact_info); - void operator=(const ContactInfo& info); + const string16& first() const { return first_; } + const string16& middle() const { return middle_; } + const string16& last() const { return last_; } + const string16& suffix() const { return suffix_; } + const string16& email() const { return email_; } + const string16& company_name() const { return company_name_; } // A helper function for FindInfoMatches that only handles matching the info // with the requested field type. |