| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_DATA_UTIL_H_ | 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_DATA_UTIL_H_ |
| 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_DATA_UTIL_H_ | 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_DATA_UTIL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 base::string16 JoinNameParts(base::StringPiece16 given, | 45 base::string16 JoinNameParts(base::StringPiece16 given, |
| 46 base::StringPiece16 middle, | 46 base::StringPiece16 middle, |
| 47 base::StringPiece16 family); | 47 base::StringPiece16 family); |
| 48 | 48 |
| 49 // Returns true iff |full_name| is a concatenation of some combination of the | 49 // Returns true iff |full_name| is a concatenation of some combination of the |
| 50 // first/middle/last (incl. middle initial) in |profile|. | 50 // first/middle/last (incl. middle initial) in |profile|. |
| 51 bool ProfileMatchesFullName(base::StringPiece16 full_name, | 51 bool ProfileMatchesFullName(base::StringPiece16 full_name, |
| 52 const autofill::AutofillProfile& profile); | 52 const autofill::AutofillProfile& profile); |
| 53 | 53 |
| 54 // Returns the Payment Request API basic card payment spec data for the provided | 54 // Returns the Payment Request API basic card payment spec data for the provided |
| 55 // autofill credit card |type|. Will set the type and the icon to "generic" for | 55 // autofill credit card |network|. Will set the network and the icon to |
| 56 // any unrecognized type. | 56 // "generic" for any unrecognized type. |
| 57 const PaymentRequestData& GetPaymentRequestData(const std::string& type); | 57 const PaymentRequestData& GetPaymentRequestData( |
| 58 const std::string& issuer_network); |
| 58 | 59 |
| 59 // Returns the autofill credit card issuer network string for the provided | 60 // Returns the autofill credit card issuer network string for the provided |
| 60 // Payment Request API basic card payment spec |basic_card_card_issuer_network|. | 61 // Payment Request API basic card payment spec |basic_card_card_issuer_network|. |
| 61 const char* GetIssuerNetworkForBasicCardIssuerNetwork( | 62 const char* GetIssuerNetworkForBasicCardIssuerNetwork( |
| 62 const std::string& basic_card_issuer_network); | 63 const std::string& basic_card_issuer_network); |
| 63 | 64 |
| 64 // Returns whether the specified |country_code| is a valid country code. | 65 // Returns whether the specified |country_code| is a valid country code. |
| 65 bool IsValidCountryCode(const std::string& country_code); | 66 bool IsValidCountryCode(const std::string& country_code); |
| 66 bool IsValidCountryCode(const base::string16& country_code); | 67 bool IsValidCountryCode(const base::string16& country_code); |
| 67 | 68 |
| 68 } // namespace data_util | 69 } // namespace data_util |
| 69 } // namespace autofill | 70 } // namespace autofill |
| 70 | 71 |
| 71 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_DATA_UTIL_H_ | 72 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_DATA_UTIL_H_ |
| OLD | NEW |