OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/autofill_cc_infobar_delegate.h" | 5 #include "components/autofill/core/browser/autofill_cc_infobar_delegate.h" |
6 | 6 |
7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "base/test/histogram_tester.h" | 8 #include "base/test/histogram_tester.h" |
9 #include "chrome/browser/autofill/personal_data_manager_factory.h" | 9 #include "chrome/browser/autofill/personal_data_manager_factory.h" |
10 #include "chrome/browser/ui/autofill/chrome_autofill_client.h" | 10 #include "chrome/browser/ui/autofill/chrome_autofill_client.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 namespace { | 22 namespace { |
23 | 23 |
24 class TestPersonalDataManager : public PersonalDataManager { | 24 class TestPersonalDataManager : public PersonalDataManager { |
25 public: | 25 public: |
26 TestPersonalDataManager() : PersonalDataManager("en-US") {} | 26 TestPersonalDataManager() : PersonalDataManager("en-US") {} |
27 | 27 |
28 using PersonalDataManager::set_database; | 28 using PersonalDataManager::set_database; |
29 using PersonalDataManager::SetPrefService; | 29 using PersonalDataManager::SetPrefService; |
30 | 30 |
31 // Overridden to avoid a trip to the database. | 31 // Overridden to avoid a trip to the database. |
32 virtual void LoadProfiles() override {} | 32 void LoadProfiles() override {} |
33 virtual void LoadCreditCards() override {} | 33 void LoadCreditCards() override {} |
34 | 34 |
35 MOCK_METHOD1(SaveImportedCreditCard, | 35 MOCK_METHOD1(SaveImportedCreditCard, |
36 std::string(const CreditCard& imported_credit_card)); | 36 std::string(const CreditCard& imported_credit_card)); |
37 | 37 |
38 private: | 38 private: |
39 DISALLOW_COPY_AND_ASSIGN(TestPersonalDataManager); | 39 DISALLOW_COPY_AND_ASSIGN(TestPersonalDataManager); |
40 }; | 40 }; |
41 | 41 |
42 } // namespace | 42 } // namespace |
43 | 43 |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 scoped_ptr<ConfirmInfoBarDelegate> infobar(CreateDelegate()); | 139 scoped_ptr<ConfirmInfoBarDelegate> infobar(CreateDelegate()); |
140 | 140 |
141 base::HistogramTester histogram_tester; | 141 base::HistogramTester histogram_tester; |
142 infobar.reset(); | 142 infobar.reset(); |
143 histogram_tester.ExpectUniqueSample("Autofill.CreditCardInfoBar", | 143 histogram_tester.ExpectUniqueSample("Autofill.CreditCardInfoBar", |
144 AutofillMetrics::INFOBAR_IGNORED, 1); | 144 AutofillMetrics::INFOBAR_IGNORED, 1); |
145 } | 145 } |
146 } | 146 } |
147 | 147 |
148 } // namespace autofill | 148 } // namespace autofill |
OLD | NEW |