summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autofill/phone_number.cc
diff options
context:
space:
mode:
authorisherman@chromium.org <isherman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-31 23:26:08 +0000
committerisherman@chromium.org <isherman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-31 23:26:08 +0000
commitc610b168e41592946d69298e920b091465c73868 (patch)
treee4f817d03033a305b76919ef834b3e411347a7b5 /chrome/browser/autofill/phone_number.cc
parentafbb9c0416b5c69a9e7c65b1993e5eae161d04ad (diff)
downloadchromium_src-c610b168e41592946d69298e920b091465c73868.zip
chromium_src-c610b168e41592946d69298e920b091465c73868.tar.gz
chromium_src-c610b168e41592946d69298e920b091465c73868.tar.bz2
Prune dead code: FormGroup::FindInfoMatches(), FormGroup::GetPreviewText()
BUG=none TEST=compiles Review URL: http://codereview.chromium.org/6783009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80099 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autofill/phone_number.cc')
-rw-r--r--chrome/browser/autofill/phone_number.cc54
1 files changed, 0 insertions, 54 deletions
diff --git a/chrome/browser/autofill/phone_number.cc b/chrome/browser/autofill/phone_number.cc
index b06e253..247b625 100644
--- a/chrome/browser/autofill/phone_number.cc
+++ b/chrome/browser/autofill/phone_number.cc
@@ -111,31 +111,6 @@ string16 PhoneNumber::GetInfo(AutofillFieldType type) const {
return string16();
}
-void PhoneNumber::FindInfoMatches(AutofillFieldType type,
- const string16& info,
- std::vector<string16>* matched_text) const {
- if (matched_text == NULL) {
- DLOG(ERROR) << "NULL matched vector passed in";
- return;
- }
-
- string16 number(info);
- StripPunctuation(&number);
- if (!Validate(number))
- return;
-
- string16 match;
- if (type == UNKNOWN_TYPE) {
- for (int i = 0; i < kAutofillPhoneLength; ++i) {
- if (FindInfoMatchesHelper(kAutofillPhoneTypes[i], info, &match))
- matched_text->push_back(match);
- }
- } else {
- if (FindInfoMatchesHelper(AutofillType(type).subgroup(), info, &match))
- matched_text->push_back(match);
- }
-}
-
void PhoneNumber::SetInfo(AutofillFieldType type, const string16& value) {
string16 number(value);
StripPunctuation(&number);
@@ -225,35 +200,6 @@ void PhoneNumber::set_whole_number(const string16& whole_number) {
set_country_code(country_code);
}
-bool PhoneNumber::FindInfoMatchesHelper(const FieldTypeSubGroup& subgroup,
- const string16& info,
- string16* match) const {
- if (match == NULL) {
- DLOG(ERROR) << "NULL match string passed in";
- return false;
- }
-
- match->clear();
- if (subgroup == AutofillType::PHONE_NUMBER &&
- StartsWith(number(), info, true)) {
- *match = number();
- } else if (subgroup == AutofillType::PHONE_CITY_CODE &&
- StartsWith(city_code(), info, true)) {
- *match = city_code();
- } else if (subgroup == AutofillType::PHONE_COUNTRY_CODE &&
- StartsWith(country_code(), info, true)) {
- *match = country_code();
- } else if (subgroup == AutofillType::PHONE_CITY_AND_NUMBER &&
- StartsWith(CityAndNumber(), info, true)) {
- *match = CityAndNumber();
- } else if (subgroup == AutofillType::PHONE_WHOLE_NUMBER &&
- StartsWith(WholeNumber(), info, true)) {
- *match = WholeNumber();
- }
-
- return !match->empty();
-}
-
bool PhoneNumber::IsNumber(const string16& text) const {
if (text.length() > number_.length())
return false;