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_FIELD_H_ | 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_FIELD_H_ |
6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_FIELD_H_ | 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_FIELD_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
68 // Set |field_data|'s value to |value|. Uses |field|, |address_language_code|, | 68 // Set |field_data|'s value to |value|. Uses |field|, |address_language_code|, |
69 // and |app_locale| as hints when filling exceptional cases like phone number | 69 // and |app_locale| as hints when filling exceptional cases like phone number |
70 // values and <select> fields. Returns |true| if the field has been filled, | 70 // values and <select> fields. Returns |true| if the field has been filled, |
71 // |false| otherwise. | 71 // |false| otherwise. |
72 static bool FillFormField(const AutofillField& field, | 72 static bool FillFormField(const AutofillField& field, |
73 const base::string16& value, | 73 const base::string16& value, |
74 const std::string& address_language_code, | 74 const std::string& address_language_code, |
75 const std::string& app_locale, | 75 const std::string& app_locale, |
76 FormFieldData* field_data); | 76 FormFieldData* field_data); |
77 | 77 |
78 static void GetPhoneNumberValue(const AutofillField& field, | |
Ilya Sherman
2014/09/03 00:55:49
Please document this method.
Ilya Sherman
2014/09/03 00:55:49
Can this method return the value, rather than writ
ziran.sun
2014/09/04 13:10:25
Done.
ziran.sun
2014/09/04 13:10:25
Done.
| |
79 const base::string16& number, | |
80 FormFieldData* field_data, | |
Ilya Sherman
2014/09/03 00:55:49
Can this be passed by const-reference rather than
ziran.sun
2014/09/04 13:10:25
Done.
| |
81 base::string16* value); | |
82 | |
78 private: | 83 private: |
79 // The unique name of this field, generated by Autofill. | 84 // The unique name of this field, generated by Autofill. |
80 base::string16 unique_name_; | 85 base::string16 unique_name_; |
81 | 86 |
82 // The unique identifier for the section (e.g. billing vs. shipping address) | 87 // The unique identifier for the section (e.g. billing vs. shipping address) |
83 // that this field belongs to. | 88 // that this field belongs to. |
84 std::string section_; | 89 std::string section_; |
85 | 90 |
86 // The type of the field, as determined by the Autofill server. | 91 // The type of the field, as determined by the Autofill server. |
87 ServerFieldType server_type_; | 92 ServerFieldType server_type_; |
(...skipping 16 matching lines...) Expand all Loading... | |
104 | 109 |
105 // The default value returned by the Autofill server. | 110 // The default value returned by the Autofill server. |
106 std::string default_value_; | 111 std::string default_value_; |
107 | 112 |
108 DISALLOW_COPY_AND_ASSIGN(AutofillField); | 113 DISALLOW_COPY_AND_ASSIGN(AutofillField); |
109 }; | 114 }; |
110 | 115 |
111 } // namespace autofill | 116 } // namespace autofill |
112 | 117 |
113 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_FIELD_H_ | 118 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_FIELD_H_ |
OLD | NEW |