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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
79 static bool FillFormField(const AutofillField& field, | 79 static bool FillFormField(const AutofillField& field, |
80 const base::string16& value, | 80 const base::string16& value, |
81 const std::string& address_language_code, | 81 const std::string& address_language_code, |
82 const std::string& app_locale, | 82 const std::string& app_locale, |
83 FormFieldData* field_data); | 83 FormFieldData* field_data); |
84 | 84 |
85 // Returns the phone number value for the given |field|. The returned value | 85 // Returns the phone number value for the given |field|. The returned value |
86 // might be |number|, or could possibly be a prefix or suffix of |number| | 86 // might be |number|, or could possibly be a prefix or suffix of |number| |
87 // if that's appropriate for the field. | 87 // if that's appropriate for the field. |
88 static base::string16 GetPhoneNumberValue(const AutofillField& field, | 88 static base::string16 GetPhoneNumberValue(const AutofillField& field, |
89 const base::string16& number, | 89 const base::string16& number); |
90 const FormFieldData& field_data); | 90 |
91 // Returns the credit card number value for the given |field|. The returned | |
92 // value might be |number|, or possibly an appropriate substring of |number| | |
93 // for cases where credit card number splits across multiple HTML form input | |
94 // fields. | |
95 static base::string16 GetCreditCardNumberValue(const AutofillField& field, | |
96 const base::string16& number); | |
Ilya Sherman
2014/10/28 21:48:40
It looks like this change is no longer needed as p
Pritam Nikam
2014/10/29 08:38:16
Done.
I've created a follow-up CL for this code r
| |
91 | 97 |
92 private: | 98 private: |
93 // The unique name of this field, generated by Autofill. | 99 // The unique name of this field, generated by Autofill. |
94 base::string16 unique_name_; | 100 base::string16 unique_name_; |
95 | 101 |
96 // The unique identifier for the section (e.g. billing vs. shipping address) | 102 // The unique identifier for the section (e.g. billing vs. shipping address) |
97 // that this field belongs to. | 103 // that this field belongs to. |
98 std::string section_; | 104 std::string section_; |
99 | 105 |
100 // The type of the field, as determined by the Autofill server. | 106 // The type of the field, as determined by the Autofill server. |
(...skipping 21 matching lines...) Expand all Loading... | |
122 // Used to hold the position of the first digit to be copied as a substring | 128 // Used to hold the position of the first digit to be copied as a substring |
123 // from credit card number. | 129 // from credit card number. |
124 size_t credit_card_number_offset_; | 130 size_t credit_card_number_offset_; |
125 | 131 |
126 DISALLOW_COPY_AND_ASSIGN(AutofillField); | 132 DISALLOW_COPY_AND_ASSIGN(AutofillField); |
127 }; | 133 }; |
128 | 134 |
129 } // namespace autofill | 135 } // namespace autofill |
130 | 136 |
131 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_FIELD_H_ | 137 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_FIELD_H_ |
OLD | NEW |