summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autofill/address.cc
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-09 18:30:23 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-09 18:30:23 +0000
commit1308c283511927e3f40082c3a41cddb985846ed0 (patch)
treea9b48b42e15add0f6cb67de5a0e4210914dd5e2e /chrome/browser/autofill/address.cc
parent93eb46a8d34c17d9303d4f7a8189ade27d05f9f8 (diff)
downloadchromium_src-1308c283511927e3f40082c3a41cddb985846ed0.zip
chromium_src-1308c283511927e3f40082c3a41cddb985846ed0.tar.gz
chromium_src-1308c283511927e3f40082c3a41cddb985846ed0.tar.bz2
autofill: Rename FormGroup::GetPossibleFieldTypes() and ::GetAvailableFieldTypes() to be clearer.
GetPossibleFieldTypes() -> GetMatchingTypes(). GetAvailableFieldTypes() -> GetNonEmptyTypes(). BUG=81767 TEST=None R=dhollowa@chromium.org,isherman@chromium.org Review URL: http://codereview.chromium.org/6970005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84645 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autofill/address.cc')
-rw-r--r--chrome/browser/autofill/address.cc34
1 files changed, 17 insertions, 17 deletions
diff --git a/chrome/browser/autofill/address.cc b/chrome/browser/autofill/address.cc
index fa2cf0c..0a687a1 100644
--- a/chrome/browser/autofill/address.cc
+++ b/chrome/browser/autofill/address.cc
@@ -53,9 +53,9 @@ Address& Address::operator=(const Address& address) {
return *this;
}
-void Address::GetPossibleFieldTypes(const string16& text,
- FieldTypeSet* possible_types) const {
- DCHECK(possible_types);
+void Address::GetMatchingTypes(const string16& text,
+ FieldTypeSet* matching_types) const {
+ DCHECK(matching_types);
// If the text to match against the field types is empty, then no results will
// match.
@@ -63,44 +63,44 @@ void Address::GetPossibleFieldTypes(const string16& text,
return;
if (IsLine1(text))
- possible_types->insert(ADDRESS_HOME_LINE1);
+ matching_types->insert(ADDRESS_HOME_LINE1);
if (IsLine2(text))
- possible_types->insert(ADDRESS_HOME_LINE2);
+ matching_types->insert(ADDRESS_HOME_LINE2);
if (IsCity(text))
- possible_types->insert(ADDRESS_HOME_CITY);
+ matching_types->insert(ADDRESS_HOME_CITY);
if (IsState(text))
- possible_types->insert(ADDRESS_HOME_STATE);
+ matching_types->insert(ADDRESS_HOME_STATE);
if (IsZipCode(text))
- possible_types->insert(ADDRESS_HOME_ZIP);
+ matching_types->insert(ADDRESS_HOME_ZIP);
if (IsCountry(text))
- possible_types->insert(ADDRESS_HOME_COUNTRY);
+ matching_types->insert(ADDRESS_HOME_COUNTRY);
}
-void Address::GetAvailableFieldTypes(FieldTypeSet* available_types) const {
- DCHECK(available_types);
+void Address::GetNonEmptyTypes(FieldTypeSet* non_empty_types) const {
+ DCHECK(non_empty_types);
if (!line1_.empty())
- available_types->insert(ADDRESS_HOME_LINE1);
+ non_empty_types->insert(ADDRESS_HOME_LINE1);
if (!line2_.empty())
- available_types->insert(ADDRESS_HOME_LINE2);
+ non_empty_types->insert(ADDRESS_HOME_LINE2);
if (!city_.empty())
- available_types->insert(ADDRESS_HOME_CITY);
+ non_empty_types->insert(ADDRESS_HOME_CITY);
if (!state_.empty())
- available_types->insert(ADDRESS_HOME_STATE);
+ non_empty_types->insert(ADDRESS_HOME_STATE);
if (!zip_code_.empty())
- available_types->insert(ADDRESS_HOME_ZIP);
+ non_empty_types->insert(ADDRESS_HOME_ZIP);
if (!country_code_.empty())
- available_types->insert(ADDRESS_HOME_COUNTRY);
+ non_empty_types->insert(ADDRESS_HOME_COUNTRY);
}
string16 Address::GetInfo(AutofillFieldType type) const {