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
3 // found in the LICENSE file.
4 #ifndef IOS_CHROME_BROWSER_AUTOFILL_AUTOFILL_AGENT_UTILS_H_
5 #define IOS_CHROME_BROWSER_AUTOFILL_AUTOFILL_AGENT_UTILS_H_
7 // TODO (sgrant): Switch to componentized version of this code when
8 // http://crbug/328070 is fixed.
14 namespace autofill_agent_util
{
16 // Determines if the |structure| has any fields that are of type
17 // autofill::CREDIT_CARD and thus asking for credit card info.
18 bool RequestingCreditCardInfo(const autofill::FormStructure
* structure
);
20 // Returns true if one of the nodes in |structure| request information related
21 // to a billing address.
22 bool RequestFullBillingAddress(autofill::FormStructure
* structure
);
24 // Returns true if one of the nodes in |structure| request information related
25 // to a shipping address. To determine this actually attempt to fill the form
26 // using an empty data model that tracks which fields are requested.
27 bool RequestShippingAddress(autofill::FormStructure
* structure
);
29 // Returns true if one of the nodes in |structure| request information related
31 bool RequestPhoneNumber(autofill::FormStructure
* structure
);
33 } // namespace autofill_agent_util
35 #endif // IOS_CHROME_BROWSER_AUTOFILL_AUTOFILL_AGENT_UTILS_H_