Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / ios / chrome / browser / autofill / autofill_agent_utils.h
blobd8f6c1380bbb0411bf02d8c1f27f0552ce6b1a3d
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.
10 namespace autofill {
11 class FormStructure;
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
30 // to a phone number.
31 bool RequestPhoneNumber(autofill::FormStructure* structure);
33 } // namespace autofill_agent_util
35 #endif // IOS_CHROME_BROWSER_AUTOFILL_AUTOFILL_AGENT_UTILS_H_