diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-26 02:05:48 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-26 02:05:48 +0000 |
commit | e0fcc515ac27f502b4e391fb7c1c865171bf7581 (patch) | |
tree | dcd271298bc24c7c815c4dc29b4961dc52524319 /chrome/browser/autofill/personal_data_manager.cc | |
parent | aa80fda1253403a24efe5bc23d6cbdacfefaf80f (diff) | |
download | chromium_src-e0fcc515ac27f502b4e391fb7c1c865171bf7581.zip chromium_src-e0fcc515ac27f502b4e391fb7c1c865171bf7581.tar.gz chromium_src-e0fcc515ac27f502b4e391fb7c1c865171bf7581.tar.bz2 |
autofill: Add GetCreditCardById to PersonalDataManager.
BUG=None
TEST=crl --enable-tabbed-options. The AutoFill options should works as before.
Review URL: http://codereview.chromium.org/4012005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63843 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autofill/personal_data_manager.cc')
-rw-r--r-- | chrome/browser/autofill/personal_data_manager.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/chrome/browser/autofill/personal_data_manager.cc b/chrome/browser/autofill/personal_data_manager.cc index 4600cad..fe4c2ea 100644 --- a/chrome/browser/autofill/personal_data_manager.cc +++ b/chrome/browser/autofill/personal_data_manager.cc @@ -549,6 +549,15 @@ void PersonalDataManager::RemoveCreditCard(int unique_id) { SetCreditCards(&credit_cards); } +CreditCard* PersonalDataManager::GetCreditCardById(int unique_id) { + for (std::vector<CreditCard*>::iterator iter = credit_cards_.begin(); + iter != credit_cards_.end(); ++iter) { + if ((*iter)->unique_id() == unique_id) + return *iter; + } + return NULL; +} + void PersonalDataManager::GetPossibleFieldTypes(const string16& text, FieldTypeSet* possible_types) { string16 clean_info = StringToLowerASCII(CollapseWhitespace(text, false)); |