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

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

Issue 666133002: Standardize usage of virtual/override/final in components/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_TEST_PERSONAL_DATA_MANAGER_H_ 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_TEST_PERSONAL_DATA_MANAGER_H_
6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_TEST_PERSONAL_DATA_MANAGER_H_ 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_TEST_PERSONAL_DATA_MANAGER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "components/autofill/core/browser/autofill_profile.h" 10 #include "components/autofill/core/browser/autofill_profile.h"
11 #include "components/autofill/core/browser/credit_card.h" 11 #include "components/autofill/core/browser/credit_card.h"
12 #include "components/autofill/core/browser/personal_data_manager.h" 12 #include "components/autofill/core/browser/personal_data_manager.h"
13 13
14 namespace autofill { 14 namespace autofill {
15 15
16 // A simplistic PersonalDataManager used for testing. 16 // A simplistic PersonalDataManager used for testing.
17 class TestPersonalDataManager : public PersonalDataManager { 17 class TestPersonalDataManager : public PersonalDataManager {
18 public: 18 public:
19 TestPersonalDataManager(); 19 TestPersonalDataManager();
20 virtual ~TestPersonalDataManager(); 20 ~TestPersonalDataManager() override;
21 21
22 // Adds |profile| to |profiles_|. This does not take ownership of |profile|. 22 // Adds |profile| to |profiles_|. This does not take ownership of |profile|.
23 void AddTestingProfile(AutofillProfile* profile); 23 void AddTestingProfile(AutofillProfile* profile);
24 24
25 // Adds |credit_card| to |credit_cards_|. This does not take ownership of 25 // Adds |credit_card| to |credit_cards_|. This does not take ownership of
26 // |credit_card|. 26 // |credit_card|.
27 void AddTestingCreditCard(CreditCard* credit_card); 27 void AddTestingCreditCard(CreditCard* credit_card);
28 28
29 virtual const std::vector<AutofillProfile*>& GetProfiles() const override; 29 const std::vector<AutofillProfile*>& GetProfiles() const override;
30 virtual const std::vector<AutofillProfile*>& web_profiles() const override; 30 const std::vector<AutofillProfile*>& web_profiles() const override;
31 virtual const std::vector<CreditCard*>& GetCreditCards() const override; 31 const std::vector<CreditCard*>& GetCreditCards() const override;
32 32
33 virtual std::string SaveImportedProfile( 33 std::string SaveImportedProfile(
34 const AutofillProfile& imported_profile) override; 34 const AutofillProfile& imported_profile) override;
35 virtual std::string SaveImportedCreditCard( 35 std::string SaveImportedCreditCard(
36 const CreditCard& imported_credit_card) override; 36 const CreditCard& imported_credit_card) override;
37 37
38 virtual std::string CountryCodeForCurrentTimezone() const override; 38 std::string CountryCodeForCurrentTimezone() const override;
39 virtual const std::string& GetDefaultCountryCodeForNewAddress() const 39 const std::string& GetDefaultCountryCodeForNewAddress() const override;
40 override;
41 40
42 void set_timezone_country_code(const std::string& timezone_country_code) { 41 void set_timezone_country_code(const std::string& timezone_country_code) {
43 timezone_country_code_ = timezone_country_code; 42 timezone_country_code_ = timezone_country_code;
44 } 43 }
45 void set_default_country_code(const std::string& default_country_code) { 44 void set_default_country_code(const std::string& default_country_code) {
46 default_country_code_ = default_country_code; 45 default_country_code_ = default_country_code;
47 } 46 }
48 47
49 const AutofillProfile& imported_profile() { return imported_profile_; } 48 const AutofillProfile& imported_profile() { return imported_profile_; }
50 const CreditCard& imported_credit_card() { return imported_credit_card_; } 49 const CreditCard& imported_credit_card() { return imported_credit_card_; }
51 50
52 private: 51 private:
53 std::vector<AutofillProfile*> profiles_; 52 std::vector<AutofillProfile*> profiles_;
54 std::vector<CreditCard*> credit_cards_; 53 std::vector<CreditCard*> credit_cards_;
55 AutofillProfile imported_profile_; 54 AutofillProfile imported_profile_;
56 CreditCard imported_credit_card_; 55 CreditCard imported_credit_card_;
57 std::string timezone_country_code_; 56 std::string timezone_country_code_;
58 std::string default_country_code_; 57 std::string default_country_code_;
59 }; 58 };
60 59
61 } // namespace autofill 60 } // namespace autofill
62 61
63 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_TEST_PERSONAL_DATA_MANAGER_H_ 62 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_TEST_PERSONAL_DATA_MANAGER_H_
OLDNEW
« no previous file with comments | « components/autofill/core/browser/test_autofill_driver.h ('k') | components/autofill/core/browser/webdata/autofill_change.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698