| Index: components/autofill/core/browser/credit_card.cc
|
| diff --git a/components/autofill/core/browser/credit_card.cc b/components/autofill/core/browser/credit_card.cc
|
| index f9e44afb86d3849c5ebab32c67a329270b5f9d62..1503a437d38f38996a4dd88a084f9ee46c89851b 100644
|
| --- a/components/autofill/core/browser/credit_card.cc
|
| +++ b/components/autofill/core/browser/credit_card.cc
|
| @@ -786,6 +786,12 @@ bool CreditCard::IsExpired(const base::Time& current_time) const {
|
| current_time);
|
| }
|
|
|
| +bool CreditCard::ShouldUpdateExpiration(const base::Time& current_time) const {
|
| + // Local cards always have OK server status.
|
| + DCHECK(server_status_ == OK || record_type_ != LOCAL_CARD);
|
| + return server_status_ == EXPIRED || IsExpired(current_time);
|
| +}
|
| +
|
| // So we can compare CreditCards with EXPECT_EQ().
|
| std::ostream& operator<<(std::ostream& os, const CreditCard& credit_card) {
|
| return os << base::UTF16ToUTF8(credit_card.Label()) << " "
|
|
|