Chromium Code Reviews| Index: components/autofill/core/browser/webdata/autofill_change.cc |
| diff --git a/components/autofill/core/browser/webdata/autofill_change.cc b/components/autofill/core/browser/webdata/autofill_change.cc |
| index c02bdd8464d8476d974f1cfd0a04e2c60f55af10..c0922f7d469c26b3599f09150fb7b909fd7eadce 100644 |
| --- a/components/autofill/core/browser/webdata/autofill_change.cc |
| +++ b/components/autofill/core/browser/webdata/autofill_change.cc |
| @@ -36,4 +36,22 @@ bool AutofillProfileChange::operator==( |
| (type() != REMOVE) ? *profile() == *change.profile() : true; |
| } |
| +CreditCardChange::CreditCardChange(Type type, |
| + const std::string& key, |
| + const CreditCard* card) |
| + : GenericAutofillChange<std::string>(type, key), card_(card) { |
| + DCHECK(type == ADD ? (card && card->guid() == key) : true); |
| + DCHECK(type == UPDATE ? (card && card->guid() == key) : true); |
| + DCHECK(type == REMOVE ? !card : true); |
| +} |
| + |
| +CreditCardChange::~CreditCardChange() { |
| +} |
| + |
| +bool CreditCardChange::operator==(const CreditCardChange& change) const { |
| + return type() == change.type() && key() == change.key() && (type() != REMOVE) |
|
Evan Stade
2015/05/20 21:07:37
I actually can't figure out what this is supposed
please use gerrit instead
2015/05/20 21:18:02
Done.
|
| + ? *card() == *change.card() |
| + : true; |
| +} |
| + |
| } // namespace autofill |