Chromium Code Reviews| 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..3b2382fc20641c5b49ab20b234fb5017f2d64709 100644 |
| --- a/components/autofill/core/browser/credit_card.cc |
| +++ b/components/autofill/core/browser/credit_card.cc |
| @@ -786,6 +786,18 @@ bool CreditCard::IsExpired(const base::Time& current_time) const { |
| current_time); |
| } |
| +bool CreditCard::ShouldUpdateExpiration(const base::Time& current_time) const { |
| + switch (record_type()) { |
| + case LOCAL_CARD: |
| + return IsExpired(current_time); |
| + case MASKED_SERVER_CARD: |
| + case FULL_SERVER_CARD: |
| + return server_status_ == EXPIRED || IsExpired(current_time); |
|
Mathieu
2016/04/27 19:54:50
looks like this function could be replaced with
r
please use gerrit instead
2016/04/28 00:30:24
Done.
|
| + } |
| + NOTREACHED(); |
| + return false; |
| +} |
| + |
| // 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()) << " " |