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

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

Issue 106033007: Disable wallet in countries where it's not supported, take 2. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 | Annotate | Revision Log
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 default_country_code_("US") {}
14 13
15 TestPersonalDataManager::~TestPersonalDataManager() {} 14 TestPersonalDataManager::~TestPersonalDataManager() {}
16 15
17 void TestPersonalDataManager::AddTestingProfile(AutofillProfile* profile) { 16 void TestPersonalDataManager::AddTestingProfile(AutofillProfile* profile) {
18 profiles_.push_back(profile); 17 profiles_.push_back(profile);
19 FOR_EACH_OBSERVER(PersonalDataManagerObserver, observers_, 18 FOR_EACH_OBSERVER(PersonalDataManagerObserver, observers_,
20 OnPersonalDataChanged()); 19 OnPersonalDataChanged());
21 } 20 }
22 21
23 void TestPersonalDataManager::AddTestingCreditCard(CreditCard* credit_card) { 22 void TestPersonalDataManager::AddTestingCreditCard(CreditCard* credit_card) {
24 credit_cards_.push_back(credit_card); 23 credit_cards_.push_back(credit_card);
25 FOR_EACH_OBSERVER(PersonalDataManagerObserver, observers_, 24 FOR_EACH_OBSERVER(PersonalDataManagerObserver, observers_,
26 OnPersonalDataChanged()); 25 OnPersonalDataChanged());
27 } 26 }
28 27
29 const std::vector<AutofillProfile*>& TestPersonalDataManager::GetProfiles() 28 const std::vector<AutofillProfile*>& TestPersonalDataManager::GetProfiles()
30 const { 29 const {
31 return profiles_; 30 return profiles_;
32 } 31 }
33 32
33 const std::vector<AutofillProfile*>& TestPersonalDataManager::web_profiles()
34 const {
35 return profiles_;
36 }
37
34 const std::vector<CreditCard*>& TestPersonalDataManager:: 38 const std::vector<CreditCard*>& TestPersonalDataManager::
35 GetCreditCards() const { 39 GetCreditCards() const {
36 return credit_cards_; 40 return credit_cards_;
37 } 41 }
38 42
39 std::string TestPersonalDataManager::SaveImportedProfile( 43 std::string TestPersonalDataManager::SaveImportedProfile(
40 const AutofillProfile& imported_profile) { 44 const AutofillProfile& imported_profile) {
41 imported_profile_ = imported_profile; 45 imported_profile_ = imported_profile;
42 return imported_profile.guid(); 46 return imported_profile.guid();
43 } 47 }
44 48
45 std::string TestPersonalDataManager::SaveImportedCreditCard( 49 std::string TestPersonalDataManager::SaveImportedCreditCard(
46 const CreditCard& imported_credit_card) { 50 const CreditCard& imported_credit_card) {
47 imported_credit_card_ = imported_credit_card; 51 imported_credit_card_ = imported_credit_card;
48 return imported_credit_card.guid(); 52 return imported_credit_card.guid();
49 } 53 }
50 54
51 const std::string& TestPersonalDataManager::GetDefaultCountryCodeForNewAddress() 55 std::string TestPersonalDataManager::CountryCodeForCurrentTimezone()
52 const { 56 const {
53 return default_country_code_; 57 return timezone_country_code_;
54 } 58 }
55 59
56 } // namespace autofill 60 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698