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