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

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

Issue 11889029: Minor style cleanup in the PhoneField class: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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 | « no previous file | chrome/browser/autofill/phone_field.cc » ('j') | chrome/browser/autofill/phone_field.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autofill/phone_field.h
diff --git a/chrome/browser/autofill/phone_field.h b/chrome/browser/autofill/phone_field.h
index 5aad8bc4167553e0ff6b43018250b6ddb3aee49e..0d2f546cd63483a85238a9548815c39f82233c6b 100644
--- a/chrome/browser/autofill/phone_field.h
+++ b/chrome/browser/autofill/phone_field.h
@@ -37,8 +37,6 @@ class PhoneField : public FormField {
FRIEND_TEST_ALL_PREFIXES(PhoneFieldTest, ThreePartPhoneNumberPrefixSuffix2);
FRIEND_TEST_ALL_PREFIXES(PhoneFieldTest, CountryAndCityAndPhoneNumber);
- PhoneField();
-
// This is for easy description of the possible parsing paths of the phone
// fields.
enum RegexType {
@@ -56,15 +54,6 @@ class PhoneField : public FormField {
REGEX_SEPARATOR,
};
- string16 GetRegExp(RegexType regex_id) const;
-
- // |field| - field to fill up on successful parsing.
- // |iter| - in/out. Form field iterator, points to the first field that is
- // attempted to be parsed. If parsing successful, points to the first field
- // after parsed fields.
- // TODO(isherman): This method doc is out of date.
- static bool ParseInternal(PhoneField* field, AutofillScanner* scanner);
-
// Parsed fields.
enum PhonePart {
FIELD_NONE = -1,
@@ -77,15 +66,22 @@ class PhoneField : public FormField {
FIELD_MAX,
};
- // FIELD_PHONE is always present; holds suffix if prefix is present.
- // The rest could be NULL.
- const AutofillField* parsed_phone_fields_[FIELD_MAX];
-
- static struct Parser {
+ struct Parser {
RegexType regex; // Field matching reg-ex.
PhonePart phone_part; // Index of the field.
size_t max_size; // Max size of the field to match. 0 means any.
- } phone_field_grammars_[];
+ };
+
+ static const Parser kPhoneFieldGrammars[];
+
+ PhoneField();
+
+ // Returns the regular expression string correspoding to |regex_id|
+ static string16 GetRegExp(RegexType regex_id);
+
+ // FIELD_PHONE is always present; holds suffix if prefix is present.
+ // The rest could be NULL.
+ const AutofillField* parsed_phone_fields_[FIELD_MAX];
DISALLOW_COPY_AND_ASSIGN(PhoneField);
};
« no previous file with comments | « no previous file | chrome/browser/autofill/phone_field.cc » ('j') | chrome/browser/autofill/phone_field.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698