diff options
author | dbeam@chromium.org <dbeam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-25 08:52:17 +0000 |
---|---|---|
committer | dbeam@chromium.org <dbeam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-25 08:52:17 +0000 |
commit | 0175eb343fb276b16a33a7464e524c6cee81641c (patch) | |
tree | fd09c7144fe3dfce633205a81c107291de44a9ce /components | |
parent | a8d3088c16d6146d9812388b62c48758d6b59c3a (diff) | |
download | chromium_src-0175eb343fb276b16a33a7464e524c6cee81641c.zip chromium_src-0175eb343fb276b16a33a7464e524c6cee81641c.tar.gz chromium_src-0175eb343fb276b16a33a7464e524c6cee81641c.tar.bz2 |
Don't offer to save Autofill info in incognito.
R=isherman@chromium.org
BUG=235153
Review URL: https://chromiumcodereview.appspot.com/14471014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@196367 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'components')
-rw-r--r-- | components/autofill/browser/test_personal_data_manager.cc | 10 | ||||
-rw-r--r-- | components/autofill/browser/test_personal_data_manager.h | 7 |
2 files changed, 17 insertions, 0 deletions
diff --git a/components/autofill/browser/test_personal_data_manager.cc b/components/autofill/browser/test_personal_data_manager.cc index 98e1973..01a2733 100644 --- a/components/autofill/browser/test_personal_data_manager.cc +++ b/components/autofill/browser/test_personal_data_manager.cc @@ -19,10 +19,20 @@ void TestPersonalDataManager::AddTestingProfile(AutofillProfile* profile) { OnPersonalDataChanged()); } +void TestPersonalDataManager::AddTestingCreditCard(CreditCard* credit_card) { + credit_cards_.push_back(credit_card); + FOR_EACH_OBSERVER(PersonalDataManagerObserver, observers_, + OnPersonalDataChanged()); +} + const std::vector<AutofillProfile*>& TestPersonalDataManager::GetProfiles() { return profiles_; } +const std::vector<CreditCard*>& TestPersonalDataManager::credit_cards() const { + return credit_cards_; +} + void TestPersonalDataManager::SaveImportedProfile( const AutofillProfile& imported_profile) { imported_profile_ = imported_profile; diff --git a/components/autofill/browser/test_personal_data_manager.h b/components/autofill/browser/test_personal_data_manager.h index e0b8c21..53f512d 100644 --- a/components/autofill/browser/test_personal_data_manager.h +++ b/components/autofill/browser/test_personal_data_manager.h @@ -8,6 +8,7 @@ #include <vector> #include "components/autofill/browser/autofill_profile.h" +#include "components/autofill/browser/credit_card.h" #include "components/autofill/browser/personal_data_manager.h" namespace autofill { @@ -21,14 +22,20 @@ class TestPersonalDataManager : public PersonalDataManager { // Adds |profile| to |profiles_|. This does not take ownership of |profile|. void AddTestingProfile(AutofillProfile* profile); + // Adds |credit_card| to |credit_cards_|. This does not take ownership of + // |credit_card|. + void AddTestingCreditCard(CreditCard* credit_card); + virtual const std::vector<AutofillProfile*>& GetProfiles() OVERRIDE; virtual void SaveImportedProfile(const AutofillProfile& imported_profile) OVERRIDE; const AutofillProfile& imported_profile() { return imported_profile_; } + virtual const std::vector<CreditCard*>& credit_cards() const OVERRIDE; private: std::vector<AutofillProfile*> profiles_; + std::vector<CreditCard*> credit_cards_; AutofillProfile imported_profile_; }; |