OLD | NEW |
(Empty) | |
| 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_ |
| 6 |
| 7 // TODO (sgrant): Switch to componentized version of this code when |
| 8 // http://crbug/328070 is fixed. |
| 9 |
| 10 namespace autofill { |
| 11 class FormStructure; |
| 12 } |
| 13 |
| 14 namespace autofill_agent_util { |
| 15 |
| 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); |
| 19 |
| 20 // Returns true if one of the nodes in |structure| request information related |
| 21 // to a billing address. |
| 22 bool RequestFullBillingAddress(autofill::FormStructure* structure); |
| 23 |
| 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); |
| 28 |
| 29 // Returns true if one of the nodes in |structure| request information related |
| 30 // to a phone number. |
| 31 bool RequestPhoneNumber(autofill::FormStructure* structure); |
| 32 |
| 33 } // namespace autofill_agent_util |
| 34 |
| 35 #endif // IOS_CHROME_BROWSER_AUTOFILL_AUTOFILL_AGENT_UTILS_H_ |
OLD | NEW |