1 // Copyright 2015 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.
5 #ifndef COMPONENTS_AUTOFILL_IOS_BROWSER_CREDIT_CARD_UTIL_H_
6 #define COMPONENTS_AUTOFILL_IOS_BROWSER_CREDIT_CARD_UTIL_H_
8 #import <Foundation/Foundation.h>
16 // Returns |credit_card| name in |locale| as an autoreleased NSString.
17 NSString
* GetCreditCardName(const CreditCard
& credit_card
,
18 const std::string
& locale
);
20 // Returns |credit_card| obfuscated number as an autoreleased NSString.
21 NSString
* GetCreditCardObfuscatedNumber(const CreditCard
& credit_card
);
23 // Returns |credit_card| expiration date as an autoreleased NSDateComponents.
24 // Only |year| and |month| fields of the NSDateComponents are valid.
25 NSDateComponents
* GetCreditCardExpirationDate(const CreditCard
& credit_card
);
27 // Returns whether |credit_card| is a local card.
28 BOOL
IsCreditCardLocal(const CreditCard
& credit_card
);
30 } // namespace autofill
32 #endif // COMPONENTS_AUTOFILL_IOS_BROWSER_CREDIT_CARD_UTIL_H_