| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_AUTOFILL_PHONE_NUMBER_H_ | 5 #ifndef CHROME_BROWSER_AUTOFILL_PHONE_NUMBER_H_ |
| 6 #define CHROME_BROWSER_AUTOFILL_PHONE_NUMBER_H_ | 6 #define CHROME_BROWSER_AUTOFILL_PHONE_NUMBER_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/string16.h" | 10 #include "base/string16.h" |
| 11 #include "chrome/browser/autofill/form_group.h" | 11 #include "chrome/browser/autofill/form_group.h" |
| 12 | 12 |
| 13 // A form group that stores phone number information. | 13 // A form group that stores phone number information. |
| 14 class PhoneNumber : public FormGroup { | 14 class PhoneNumber : public FormGroup { |
| 15 public: | 15 public: |
| 16 PhoneNumber() {} |
| 17 virtual ~PhoneNumber() {} |
| 18 |
| 16 // FormGroup implementation: | 19 // FormGroup implementation: |
| 17 virtual FormGroup* Clone() const = 0; | 20 virtual FormGroup* Clone() const = 0; |
| 18 virtual void GetPossibleFieldTypes(const string16& text, | 21 virtual void GetPossibleFieldTypes(const string16& text, |
| 19 FieldTypeSet* possible_types) const; | 22 FieldTypeSet* possible_types) const; |
| 20 virtual void FindInfoMatches(const AutoFillType& type, | 23 virtual void FindInfoMatches(const AutoFillType& type, |
| 21 const string16& info, | 24 const string16& info, |
| 22 std::vector<string16>* matched_text) const; | 25 std::vector<string16>* matched_text) const; |
| 23 virtual string16 GetFieldText(const AutoFillType& type) const; | 26 virtual string16 GetFieldText(const AutoFillType& type) const; |
| 24 virtual void SetInfo(const AutoFillType& type, const string16& value); | 27 virtual void SetInfo(const AutoFillType& type, const string16& value); |
| 25 | 28 |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 void StripPunctuation(string16* number) const; | 75 void StripPunctuation(string16* number) const; |
| 73 | 76 |
| 74 // The pieces of the phone number. | 77 // The pieces of the phone number. |
| 75 string16 country_code_; | 78 string16 country_code_; |
| 76 string16 city_code_; // city or area code. | 79 string16 city_code_; // city or area code. |
| 77 string16 number_; | 80 string16 number_; |
| 78 string16 extension_; | 81 string16 extension_; |
| 79 }; | 82 }; |
| 80 | 83 |
| 81 #endif // CHROME_BROWSER_AUTOFILL_PHONE_NUMBER_H_ | 84 #endif // CHROME_BROWSER_AUTOFILL_PHONE_NUMBER_H_ |
| OLD | NEW |