diff options
author | dhollowa@chromium.org <dhollowa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-21 23:55:37 +0000 |
---|---|---|
committer | dhollowa@chromium.org <dhollowa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-21 23:55:37 +0000 |
commit | 86412bbe2d0bd85e95e61ed86fc37edcdc415737 (patch) | |
tree | c871eb1e82af025d4337b9fa03cf802da745efe9 /chrome/browser/autofill/autofill_profile.cc | |
parent | 5bdd2acf9bc6b955e90d8d187bb71bd306b7633a (diff) | |
download | chromium_src-86412bbe2d0bd85e95e61ed86fc37edcdc415737.zip chromium_src-86412bbe2d0bd85e95e61ed86fc37edcdc415737.tar.gz chromium_src-86412bbe2d0bd85e95e61ed86fc37edcdc415737.tar.bz2 |
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
Diffstat (limited to 'chrome/browser/autofill/autofill_profile.cc')
-rw-r--r-- | chrome/browser/autofill/autofill_profile.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/chrome/browser/autofill/autofill_profile.cc b/chrome/browser/autofill/autofill_profile.cc index 3aa8fbe..f12b0f8 100644 --- a/chrome/browser/autofill/autofill_profile.cc +++ b/chrome/browser/autofill/autofill_profile.cc @@ -205,6 +205,7 @@ string16 AutoFillProfile::PreviewSummary() const { return summary_format; } +// static bool AutoFillProfile::AdjustInferredLabels( std::vector<AutoFillProfile*>* profiles) { std::vector<string16> created_labels; @@ -222,6 +223,7 @@ bool AutoFillProfile::AdjustInferredLabels( return updated_labels; } +// static void AutoFillProfile::CreateInferredLabels( const std::vector<AutoFillProfile*>* profiles, std::vector<string16>* created_labels, @@ -375,6 +377,12 @@ void AutoFillProfile::CreateInferredLabels( } } +bool AutoFillProfile::IsEmpty() const { + FieldTypeSet types; + GetAvailableFieldTypes(&types); + return types.empty(); +} + void AutoFillProfile::operator=(const AutoFillProfile& source) { label_ = source.label_; unique_id_ = source.unique_id_; |