| 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 | 73 |
| 74 // Created inferred labels for |profiles|, according to the rules above and | 74 // Created inferred labels for |profiles|, according to the rules above and |
| 75 // stores them in |created_labels|. |minimal_fields_shown| minimal number of | 75 // stores them in |created_labels|. |minimal_fields_shown| minimal number of |
| 76 // fields that need to be shown for the label. |exclude_field| is excluded | 76 // fields that need to be shown for the label. |exclude_field| is excluded |
| 77 // from the label. | 77 // from the label. |
| 78 static void CreateInferredLabels( | 78 static void CreateInferredLabels( |
| 79 const std::vector<AutoFillProfile*>* profiles, | 79 const std::vector<AutoFillProfile*>* profiles, |
| 80 std::vector<string16>* created_labels, | 80 std::vector<string16>* created_labels, |
| 81 size_t minimal_fields_shown, | 81 size_t minimal_fields_shown, |
| 82 AutoFillFieldType exclude_field); | 82 AutoFillFieldType exclude_field); |
| 83 |
| 84 // Returns true if there are no values (field types) set. |
| 85 bool IsEmpty() const; |
| 86 |
| 83 // For use in STL containers. | 87 // For use in STL containers. |
| 84 void operator=(const AutoFillProfile&); | 88 void operator=(const AutoFillProfile&); |
| 85 | 89 |
| 86 // For WebData and Sync. | 90 // For WebData and Sync. |
| 87 bool operator==(const AutoFillProfile& profile) const; | 91 bool operator==(const AutoFillProfile& profile) const; |
| 88 virtual bool operator!=(const AutoFillProfile& profile) const; | 92 virtual bool operator!=(const AutoFillProfile& profile) const; |
| 89 void set_label(const string16& label) { label_ = label; } | 93 void set_label(const string16& label) { label_ = label; } |
| 90 | 94 |
| 91 private: | 95 private: |
| 92 Address* GetHomeAddress(); | 96 Address* GetHomeAddress(); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 105 int unique_id_; | 109 int unique_id_; |
| 106 | 110 |
| 107 // Personal information for this profile. | 111 // Personal information for this profile. |
| 108 FormGroupMap personal_info_; | 112 FormGroupMap personal_info_; |
| 109 }; | 113 }; |
| 110 | 114 |
| 111 // So we can compare AutoFillProfiles with EXPECT_EQ(). | 115 // So we can compare AutoFillProfiles with EXPECT_EQ(). |
| 112 std::ostream& operator<<(std::ostream& os, const AutoFillProfile& profile); | 116 std::ostream& operator<<(std::ostream& os, const AutoFillProfile& profile); |
| 113 | 117 |
| 114 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_PROFILE_H_ | 118 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_PROFILE_H_ |
| OLD | NEW |