From 86412bbe2d0bd85e95e61ed86fc37edcdc415737 Mon Sep 17 00:00:00 2001 From: "dhollowa@chromium.org" Date: Wed, 21 Jul 2010 23:55:37 +0000 Subject: AutoFill Empty profiles should not be saved from AutoFillDialog Add and Edit sheets on Mac. Changes the AutoFillDialog on Mac to not store intermediate results of "Add" and "Edit" actions when those actions result in empty address or credit card information. Empty addresses and credit card information is culled at this level now, not just after "Save" from the main dialog. BUG=47742 TEST=AutoFillDialogControllerTest.AddNewProfile, AutoFillDialogControllerTest.AddNewEmptyProfile, AutoFillDialogControllerTest.AddNewCreditCard, AutoFillDialogControllerTest.AddNewEmptyCreditCard Review URL: http://codereview.chromium.org/3061001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53276 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/autofill/credit_card.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'chrome/browser/autofill/credit_card.h') diff --git a/chrome/browser/autofill/credit_card.h b/chrome/browser/autofill/credit_card.h index faf4326..85d104f 100644 --- a/chrome/browser/autofill/credit_card.h +++ b/chrome/browser/autofill/credit_card.h @@ -59,6 +59,9 @@ class CreditCard : public FormGroup { // validate the number. static bool IsCreditCardNumber(const string16& text); + // Returns true if there are no values (field types) set. + bool IsEmpty() const; + private: // The month and year are zero if not present. int Expiration4DigitYear() const { return expiration_year_; } -- cgit v1.1