| 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_SELECT_CONTROL_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_AUTOFILL_SELECT_CONTROL_HANDLER_H_ |
| 6 #define CHROME_BROWSER_AUTOFILL_SELECT_CONTROL_HANDLER_H_ | 6 #define CHROME_BROWSER_AUTOFILL_SELECT_CONTROL_HANDLER_H_ |
| 7 | 7 |
| 8 #include "chrome/browser/autofill/field_types.h" | 8 #include "chrome/browser/autofill/field_types.h" |
| 9 #include "base/string16.h" | 9 #include "base/string16.h" |
| 10 | 10 |
| 11 class FormGroup; | 11 class FormGroup; |
| 12 | 12 |
| 13 namespace webkit { | 13 namespace chrome { |
| 14 namespace forms { | |
| 15 struct FormField; | 14 struct FormField; |
| 16 } | 15 } |
| 17 } | |
| 18 | 16 |
| 19 namespace autofill { | 17 namespace autofill { |
| 20 | 18 |
| 21 // Fills a select-one control with the appropriate value from |form_group|. | 19 // Fills a select-one control with the appropriate value from |form_group|. |
| 22 // Finds the matching value for field types that we know contain different | 20 // Finds the matching value for field types that we know contain different |
| 23 // variations of a value, e.g., (tx, TX, Texas) or credit card expiration | 21 // variations of a value, e.g., (tx, TX, Texas) or credit card expiration |
| 24 // months, e.g., (04, April). | 22 // months, e.g., (04, April). |
| 25 void FillSelectControl(const FormGroup& form_group, | 23 void FillSelectControl(const FormGroup& form_group, |
| 26 AutofillFieldType type, | 24 AutofillFieldType type, |
| 27 webkit::forms::FormField* field); | 25 chrome::FormField* field); |
| 28 | 26 |
| 29 // Returns true if |value| is a valid US state name or abbreviation. It is case | 27 // Returns true if |value| is a valid US state name or abbreviation. It is case |
| 30 // insensitive. Valid for US states only. | 28 // insensitive. Valid for US states only. |
| 31 bool IsValidState(const string16& value); | 29 bool IsValidState(const string16& value); |
| 32 | 30 |
| 33 } // namespace autofill | 31 } // namespace autofill |
| 34 | 32 |
| 35 #endif // CHROME_BROWSER_AUTOFILL_SELECT_CONTROL_HANDLER_H_ | 33 #endif // CHROME_BROWSER_AUTOFILL_SELECT_CONTROL_HANDLER_H_ |
| OLD | NEW |