Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_PROFILE_H_ | 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_PROFILE_H_ |
| 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_PROFILE_H_ | 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_PROFILE_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <iosfwd> | 10 #include <iosfwd> |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 125 // and |excluded_field| is ignored; by convention, it should be of | 125 // and |excluded_field| is ignored; by convention, it should be of |
| 126 // |UNKNOWN_TYPE| when |suggested_fields| is NULL. Each label includes at | 126 // |UNKNOWN_TYPE| when |suggested_fields| is NULL. Each label includes at |
| 127 // least |minimal_fields_shown| fields, if possible. | 127 // least |minimal_fields_shown| fields, if possible. |
| 128 static void CreateInferredLabels( | 128 static void CreateInferredLabels( |
| 129 const std::vector<AutofillProfile*>& profiles, | 129 const std::vector<AutofillProfile*>& profiles, |
| 130 const std::vector<ServerFieldType>* suggested_fields, | 130 const std::vector<ServerFieldType>* suggested_fields, |
| 131 ServerFieldType excluded_field, | 131 ServerFieldType excluded_field, |
| 132 size_t minimal_fields_shown, | 132 size_t minimal_fields_shown, |
| 133 std::vector<base::string16>* labels); | 133 std::vector<base::string16>* labels); |
| 134 | 134 |
| 135 const std::string& language_code() const { return language_code_; } | |
| 136 void set_language_code(const std::string& language_code) { | |
| 137 language_code_ = language_code; | |
| 138 } | |
| 139 | |
| 135 private: | 140 private: |
| 136 typedef std::vector<const FormGroup*> FormGroupList; | 141 typedef std::vector<const FormGroup*> FormGroupList; |
| 137 | 142 |
| 138 // FormGroup: | 143 // FormGroup: |
| 139 virtual void GetSupportedTypes( | 144 virtual void GetSupportedTypes( |
| 140 ServerFieldTypeSet* supported_types) const OVERRIDE; | 145 ServerFieldTypeSet* supported_types) const OVERRIDE; |
| 141 | 146 |
| 142 // Shared implementation for GetRawMultiInfo() and GetMultiInfo(). Pass an | 147 // Shared implementation for GetRawMultiInfo() and GetMultiInfo(). Pass an |
| 143 // empty |app_locale| to get the raw info; otherwise, the returned info is | 148 // empty |app_locale| to get the raw info; otherwise, the returned info is |
| 144 // canonicalized according to the given |app_locale|, if appropriate. | 149 // canonicalized according to the given |app_locale|, if appropriate. |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 178 FormGroupList FormGroups() const; | 183 FormGroupList FormGroups() const; |
| 179 const FormGroup* FormGroupForType(const AutofillType& type) const; | 184 const FormGroup* FormGroupForType(const AutofillType& type) const; |
| 180 FormGroup* MutableFormGroupForType(const AutofillType& type); | 185 FormGroup* MutableFormGroupForType(const AutofillType& type); |
| 181 | 186 |
| 182 // Personal information for this profile. | 187 // Personal information for this profile. |
| 183 std::vector<NameInfo> name_; | 188 std::vector<NameInfo> name_; |
| 184 std::vector<EmailInfo> email_; | 189 std::vector<EmailInfo> email_; |
| 185 CompanyInfo company_; | 190 CompanyInfo company_; |
| 186 std::vector<PhoneNumber> phone_number_; | 191 std::vector<PhoneNumber> phone_number_; |
| 187 Address address_; | 192 Address address_; |
| 193 std::string language_code_; | |
|
Ilya Sherman
2014/03/29 01:24:42
nit: Docs, please.
please use gerrit instead
2014/04/02 21:54:52
Done.
| |
| 188 }; | 194 }; |
| 189 | 195 |
| 190 // So we can compare AutofillProfiles with EXPECT_EQ(). | 196 // So we can compare AutofillProfiles with EXPECT_EQ(). |
| 191 std::ostream& operator<<(std::ostream& os, const AutofillProfile& profile); | 197 std::ostream& operator<<(std::ostream& os, const AutofillProfile& profile); |
| 192 | 198 |
| 193 } // namespace autofill | 199 } // namespace autofill |
| 194 | 200 |
| 195 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_PROFILE_H_ | 201 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_PROFILE_H_ |
| OLD | NEW |