OLD | NEW |
| (Empty) |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_BROWSER_AUTOFILL_ADDRESS_H_ | |
6 #define CHROME_BROWSER_AUTOFILL_ADDRESS_H_ | |
7 | |
8 #include <string> | |
9 #include <vector> | |
10 | |
11 #include "base/string16.h" | |
12 #include "chrome/browser/autofill/autofill_type.h" | |
13 #include "chrome/browser/autofill/field_types.h" | |
14 #include "chrome/browser/autofill/form_group.h" | |
15 | |
16 // A form group that stores address information. | |
17 class Address : public FormGroup { | |
18 public: | |
19 Address(); | |
20 Address(const Address& address); | |
21 virtual ~Address(); | |
22 | |
23 Address& operator=(const Address& address); | |
24 | |
25 // FormGroup: | |
26 virtual string16 GetRawInfo(AutofillFieldType type) const OVERRIDE; | |
27 virtual void SetRawInfo(AutofillFieldType type, | |
28 const string16& value) OVERRIDE; | |
29 virtual void GetMatchingTypes(const string16& text, | |
30 const std::string& app_locale, | |
31 FieldTypeSet* matching_types) const OVERRIDE; | |
32 | |
33 const std::string& country_code() const { return country_code_; } | |
34 void set_country_code(const std::string& country_code) { | |
35 country_code_ = country_code; | |
36 } | |
37 | |
38 private: | |
39 // FormGroup: | |
40 virtual void GetSupportedTypes(FieldTypeSet* supported_types) const OVERRIDE; | |
41 | |
42 // Returns the localized country name corresponding to |country_code_|. | |
43 string16 Country() const; | |
44 | |
45 // The address. | |
46 string16 line1_; | |
47 string16 line2_; | |
48 string16 city_; | |
49 string16 state_; | |
50 std::string country_code_; | |
51 string16 zip_code_; | |
52 }; | |
53 | |
54 #endif // CHROME_BROWSER_AUTOFILL_ADDRESS_H_ | |
OLD | NEW |