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_AUTOFILL_PROFILE_H_ | 5 #ifndef CHROME_BROWSER_AUTOFILL_AUTOFILL_PROFILE_H_ |
6 #define CHROME_BROWSER_AUTOFILL_AUTOFILL_PROFILE_H_ | 6 #define CHROME_BROWSER_AUTOFILL_AUTOFILL_PROFILE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 38 matching lines...) Loading... |
49 | 49 |
50 void set_unique_id(int id) { unique_id_ = id; } | 50 void set_unique_id(int id) { unique_id_ = id; } |
51 int unique_id() const { return unique_id_; } | 51 int unique_id() const { return unique_id_; } |
52 | 52 |
53 // For use in STL containers. | 53 // For use in STL containers. |
54 void operator=(const AutoFillProfile&); | 54 void operator=(const AutoFillProfile&); |
55 | 55 |
56 // Used by tests. | 56 // Used by tests. |
57 // TODO(jhawkins): Move these to private and add the test as a friend. | 57 // TODO(jhawkins): Move these to private and add the test as a friend. |
58 bool operator==(const AutoFillProfile& profile) const; | 58 bool operator==(const AutoFillProfile& profile) const; |
| 59 bool operator!=(const AutoFillProfile& profile) const; |
59 void set_label(const string16& label) { label_ = label; } | 60 void set_label(const string16& label) { label_ = label; } |
60 | 61 |
61 private: | 62 private: |
62 Address* GetBillingAddress(); | 63 Address* GetBillingAddress(); |
63 Address* GetHomeAddress(); | 64 Address* GetHomeAddress(); |
64 | 65 |
65 // The label presented to the user when selecting a profile. | 66 // The label presented to the user when selecting a profile. |
66 string16 label_; | 67 string16 label_; |
67 | 68 |
68 // The unique ID of this profile. | 69 // The unique ID of this profile. |
69 int unique_id_; | 70 int unique_id_; |
70 | 71 |
71 // If true, the billing address will be used for the home address. Correlates | 72 // If true, the billing address will be used for the home address. Correlates |
72 // with the "Use billing address" option on some billing forms. | 73 // with the "Use billing address" option on some billing forms. |
73 bool use_billing_address_; | 74 bool use_billing_address_; |
74 | 75 |
75 // Personal information for this profile. | 76 // Personal information for this profile. |
76 FormGroupMap personal_info_; | 77 FormGroupMap personal_info_; |
77 }; | 78 }; |
78 | 79 |
79 // So we can compare AutoFillProfiles with EXPECT_EQ(). | 80 // So we can compare AutoFillProfiles with EXPECT_EQ(). |
80 std::ostream& operator<<(std::ostream& os, const AutoFillProfile& profile); | 81 std::ostream& operator<<(std::ostream& os, const AutoFillProfile& profile); |
81 | 82 |
82 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_PROFILE_H_ | 83 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_PROFILE_H_ |
OLD | NEW |