Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(126)

Side by Side Diff: components/autofill/core/browser/test_personal_data_manager.cc

Issue 1138373002: Autofill: Fix WalletIntegrationAvailable() regression. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pay_07_check_wallet_available_03
Patch Set: Add missing dep for GN build. Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/autofill/core/browser/test_personal_data_manager.h" 5 #include "components/autofill/core/browser/test_personal_data_manager.h"
6 6
7 #include "components/autofill/core/browser/personal_data_manager_observer.h" 7 #include "components/autofill/core/browser/personal_data_manager_observer.h"
8 8
9 namespace autofill { 9 namespace autofill {
10 10
11 TestPersonalDataManager::TestPersonalDataManager() 11 TestPersonalDataManager::TestPersonalDataManager()
12 : PersonalDataManager("en-US") {} 12 : PersonalDataManager("en-US") {}
13 13
14 TestPersonalDataManager::~TestPersonalDataManager() {} 14 TestPersonalDataManager::~TestPersonalDataManager() {}
15 15
16 void TestPersonalDataManager::SetTestingPrefService(PrefService* pref_service) {
17 SetPrefService(pref_service);
18 }
19
16 void TestPersonalDataManager::AddTestingProfile(AutofillProfile* profile) { 20 void TestPersonalDataManager::AddTestingProfile(AutofillProfile* profile) {
17 profiles_.push_back(profile); 21 profiles_.push_back(profile);
18 NotifyPersonalDataChanged(); 22 NotifyPersonalDataChanged();
19 } 23 }
20 24
21 void TestPersonalDataManager::AddTestingCreditCard(CreditCard* credit_card) { 25 void TestPersonalDataManager::AddTestingCreditCard(CreditCard* credit_card) {
22 credit_cards_.push_back(credit_card); 26 credit_cards_.push_back(credit_card);
23 NotifyPersonalDataChanged(); 27 NotifyPersonalDataChanged();
24 } 28 }
25 29
30 void TestPersonalDataManager::AddTestingServerCreditCard(
31 const CreditCard& credit_card) {
32 server_credit_cards_.push_back(new CreditCard(credit_card));
33 }
34
26 const std::vector<AutofillProfile*>& TestPersonalDataManager::GetProfiles() 35 const std::vector<AutofillProfile*>& TestPersonalDataManager::GetProfiles()
27 const { 36 const {
28 return profiles_; 37 return profiles_;
29 } 38 }
30 39
31 const std::vector<AutofillProfile*>& TestPersonalDataManager::web_profiles() 40 const std::vector<AutofillProfile*>& TestPersonalDataManager::web_profiles()
32 const { 41 const {
33 return profiles_; 42 return profiles_;
34 } 43 }
35 44
(...skipping 21 matching lines...) Expand all
57 66
58 const std::string& TestPersonalDataManager::GetDefaultCountryCodeForNewAddress() 67 const std::string& TestPersonalDataManager::GetDefaultCountryCodeForNewAddress()
59 const { 68 const {
60 if (default_country_code_.empty()) 69 if (default_country_code_.empty())
61 return PersonalDataManager::GetDefaultCountryCodeForNewAddress(); 70 return PersonalDataManager::GetDefaultCountryCodeForNewAddress();
62 71
63 return default_country_code_; 72 return default_country_code_;
64 } 73 }
65 74
66 } // namespace autofill 75 } // namespace autofill
OLDNEW
« no previous file with comments | « components/autofill/core/browser/test_personal_data_manager.h ('k') | components/components_tests.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698