OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <list> | 9 #include <list> |
10 #include <map> | 10 #include <map> |
(...skipping 18 matching lines...) Expand all Loading... |
29 AutofillProfile(); | 29 AutofillProfile(); |
30 AutofillProfile(const AutofillProfile&); | 30 AutofillProfile(const AutofillProfile&); |
31 virtual ~AutofillProfile(); | 31 virtual ~AutofillProfile(); |
32 | 32 |
33 AutofillProfile& operator=(const AutofillProfile& profile); | 33 AutofillProfile& operator=(const AutofillProfile& profile); |
34 | 34 |
35 // FormGroup: | 35 // FormGroup: |
36 virtual void GetPossibleFieldTypes(const string16& text, | 36 virtual void GetPossibleFieldTypes(const string16& text, |
37 FieldTypeSet* possible_types) const; | 37 FieldTypeSet* possible_types) const; |
38 virtual void GetAvailableFieldTypes(FieldTypeSet* available_types) const; | 38 virtual void GetAvailableFieldTypes(FieldTypeSet* available_types) const; |
39 virtual string16 GetFieldText(const AutofillType& type) const; | 39 virtual string16 GetFieldText(AutofillFieldType type) const; |
40 // Returns true if the |value| matches the profile data corresponding to type. | 40 // Returns true if the |value| matches the profile data corresponding to type. |
41 // If the type is UNKNOWN_TYPE then |value| will be matched against all of the | 41 // If the type is UNKNOWN_TYPE then |value| will be matched against all of the |
42 // profile data. | 42 // profile data. |
43 virtual void FindInfoMatches(const AutofillType& type, | 43 virtual void FindInfoMatches(AutofillFieldType type, |
44 const string16& value, | 44 const string16& value, |
45 std::vector<string16>* matched_text) const; | 45 std::vector<string16>* matched_text) const; |
46 virtual void SetInfo(const AutofillType& type, const string16& value); | 46 virtual void SetInfo(AutofillFieldType type, const string16& value); |
47 | 47 |
48 // The user-visible label of the profile, generated in relation to other | 48 // The user-visible label of the profile, generated in relation to other |
49 // profiles. Shows at least 2 fields that differentiate profile from other | 49 // profiles. Shows at least 2 fields that differentiate profile from other |
50 // profiles. See AdjustInferredLabels() further down for more description. | 50 // profiles. See AdjustInferredLabels() further down for more description. |
51 virtual const string16 Label() const; | 51 virtual const string16 Label() const; |
52 | 52 |
53 // This guid is the primary identifier for |AutofillProfile| objects. | 53 // This guid is the primary identifier for |AutofillProfile| objects. |
54 const std::string guid() const { return guid_; } | 54 const std::string guid() const { return guid_; } |
55 void set_guid(const std::string& guid) { guid_ = guid; } | 55 void set_guid(const std::string& guid) { guid_ = guid; } |
56 | 56 |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 CompanyInfo company_; | 148 CompanyInfo company_; |
149 HomePhoneNumber home_number_; | 149 HomePhoneNumber home_number_; |
150 FaxNumber fax_number_; | 150 FaxNumber fax_number_; |
151 Address address_; | 151 Address address_; |
152 }; | 152 }; |
153 | 153 |
154 // So we can compare AutofillProfiles with EXPECT_EQ(). | 154 // So we can compare AutofillProfiles with EXPECT_EQ(). |
155 std::ostream& operator<<(std::ostream& os, const AutofillProfile& profile); | 155 std::ostream& operator<<(std::ostream& os, const AutofillProfile& profile); |
156 | 156 |
157 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_PROFILE_H_ | 157 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_PROFILE_H_ |
OLD | NEW |