diff options
author | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-15 22:58:10 +0000 |
---|---|---|
committer | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-15 22:58:10 +0000 |
commit | 4e5db5ec7f444e9499b7126a352e4b44587c67e7 (patch) | |
tree | 947e3a6665149ca6cc07cbe43c2eb835afed4d7b /chrome/browser/autofill/contact_info.h | |
parent | 58a7708f9481c17315a80a5ac996add1b9e6e739 (diff) | |
download | chromium_src-4e5db5ec7f444e9499b7126a352e4b44587c67e7.zip chromium_src-4e5db5ec7f444e9499b7126a352e4b44587c67e7.tar.gz chromium_src-4e5db5ec7f444e9499b7126a352e4b44587c67e7.tar.bz2 |
Merge 40477 - Where possible, use returnbyconstref 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
TBR=jhawkins@chromium.org
Review URL: http://codereview.chromium.org/1014003
git-svn-id: svn://svn.chromium.org/chrome/branches/342/src@41650 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. |