ozone: evdev: Sync caps lock LED state to evdev
[chromium-blink-merge.git] / components / autofill / core / browser / test_personal_data_manager.cc
blobc276e4f7aa0a0fb48bb4cb084a16d146ff6af9c0
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "components/autofill/core/browser/test_personal_data_manager.h"
7 #include "components/autofill/core/browser/personal_data_manager_observer.h"
9 namespace autofill {
11 TestPersonalDataManager::TestPersonalDataManager()
12 : PersonalDataManager("en-US") {}
14 TestPersonalDataManager::~TestPersonalDataManager() {}
16 void TestPersonalDataManager::AddTestingProfile(AutofillProfile* profile) {
17 profiles_.push_back(profile);
18 NotifyPersonalDataChanged();
21 void TestPersonalDataManager::AddTestingCreditCard(CreditCard* credit_card) {
22 credit_cards_.push_back(credit_card);
23 NotifyPersonalDataChanged();
26 const std::vector<AutofillProfile*>& TestPersonalDataManager::GetProfiles()
27 const {
28 return profiles_;
31 const std::vector<AutofillProfile*>& TestPersonalDataManager::web_profiles()
32 const {
33 return profiles_;
36 const std::vector<CreditCard*>& TestPersonalDataManager::
37 GetCreditCards() const {
38 return credit_cards_;
41 std::string TestPersonalDataManager::SaveImportedProfile(
42 const AutofillProfile& imported_profile) {
43 imported_profile_ = imported_profile;
44 return imported_profile.guid();
47 std::string TestPersonalDataManager::SaveImportedCreditCard(
48 const CreditCard& imported_credit_card) {
49 imported_credit_card_ = imported_credit_card;
50 return imported_credit_card.guid();
53 std::string TestPersonalDataManager::CountryCodeForCurrentTimezone()
54 const {
55 return timezone_country_code_;
58 const std::string& TestPersonalDataManager::GetDefaultCountryCodeForNewAddress()
59 const {
60 if (default_country_code_.empty())
61 return PersonalDataManager::GetDefaultCountryCodeForNewAddress();
63 return default_country_code_;
66 } // namespace autofill