Chromium Code Reviews| 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 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_TEST_AUTOFILL_CLIENT_H_ | 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_TEST_AUTOFILL_CLIENT_H_ |
| 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_TEST_AUTOFILL_CLIENT_H_ | 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_TEST_AUTOFILL_CLIENT_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
| 14 #include "base/i18n/rtl.h" | 14 #include "base/i18n/rtl.h" |
| 15 #include "base/macros.h" | 15 #include "base/macros.h" |
| 16 #include "components/autofill/core/browser/autofill_client.h" | 16 #include "components/autofill/core/browser/autofill_client.h" |
| 17 #include "components/autofill/core/browser/ui/save_card_bubble_controller.h" | |
|
Mathieu
2017/04/04 23:49:20
could you see if it compiles without this? Usually
Jared Saul
2017/04/05 00:58:29
Done; appears to be ok.
| |
| 17 #include "components/prefs/pref_service.h" | 18 #include "components/prefs/pref_service.h" |
| 18 #include "components/rappor/test_rappor_service.h" | 19 #include "components/rappor/test_rappor_service.h" |
| 19 #include "components/ukm/test_ukm_service.h" | 20 #include "components/ukm/test_ukm_service.h" |
| 20 #include "google_apis/gaia/fake_identity_provider.h" | 21 #include "google_apis/gaia/fake_identity_provider.h" |
| 21 #include "google_apis/gaia/fake_oauth2_token_service.h" | 22 #include "google_apis/gaia/fake_oauth2_token_service.h" |
| 22 | 23 |
| 23 namespace autofill { | 24 namespace autofill { |
| 24 | 25 |
| 25 // This class is for easier writing of tests. | 26 // This class is for easier writing of tests. |
| 26 class TestAutofillClient : public AutofillClient { | 27 class TestAutofillClient : public AutofillClient { |
| 27 public: | 28 public: |
| 28 TestAutofillClient(); | 29 TestAutofillClient(); |
| 29 ~TestAutofillClient() override; | 30 ~TestAutofillClient() override; |
| 30 | 31 |
| 31 // AutofillClient implementation. | 32 // AutofillClient implementation. |
| 32 PersonalDataManager* GetPersonalDataManager() override; | 33 PersonalDataManager* GetPersonalDataManager() override; |
| 33 scoped_refptr<AutofillWebDataService> GetDatabase() override; | 34 scoped_refptr<AutofillWebDataService> GetDatabase() override; |
| 34 PrefService* GetPrefs() override; | 35 PrefService* GetPrefs() override; |
| 35 syncer::SyncService* GetSyncService() override; | 36 syncer::SyncService* GetSyncService() override; |
| 36 IdentityProvider* GetIdentityProvider() override; | 37 IdentityProvider* GetIdentityProvider() override; |
| 37 rappor::RapporServiceImpl* GetRapporServiceImpl() override; | 38 rappor::RapporServiceImpl* GetRapporServiceImpl() override; |
| 38 ukm::UkmService* GetUkmService() override; | 39 ukm::UkmService* GetUkmService() override; |
| 40 SaveCardBubbleController* GetSaveCardBubbleController() override; | |
| 39 void ShowAutofillSettings() override; | 41 void ShowAutofillSettings() override; |
| 40 void ShowUnmaskPrompt(const CreditCard& card, | 42 void ShowUnmaskPrompt(const CreditCard& card, |
| 41 UnmaskCardReason reason, | 43 UnmaskCardReason reason, |
| 42 base::WeakPtr<CardUnmaskDelegate> delegate) override; | 44 base::WeakPtr<CardUnmaskDelegate> delegate) override; |
| 43 void OnUnmaskVerificationResult(PaymentsRpcResult result) override; | 45 void OnUnmaskVerificationResult(PaymentsRpcResult result) override; |
| 44 void ConfirmSaveCreditCardLocally(const CreditCard& card, | 46 void ConfirmSaveCreditCardLocally(const CreditCard& card, |
| 45 const base::Closure& callback) override; | 47 const base::Closure& callback) override; |
| 46 void ConfirmSaveCreditCardToCloud( | 48 void ConfirmSaveCreditCardToCloud( |
| 47 const CreditCard& card, | 49 const CreditCard& card, |
| 48 std::unique_ptr<base::DictionaryValue> legal_message, | 50 std::unique_ptr<base::DictionaryValue> legal_message, |
| 51 bool should_cvc_be_requested, | |
| 49 const base::Closure& callback) override; | 52 const base::Closure& callback) override; |
| 50 void ConfirmCreditCardFillAssist(const CreditCard& card, | 53 void ConfirmCreditCardFillAssist(const CreditCard& card, |
| 51 const base::Closure& callback) override; | 54 const base::Closure& callback) override; |
| 52 void LoadRiskData( | 55 void LoadRiskData( |
| 53 const base::Callback<void(const std::string&)>& callback) override; | 56 const base::Callback<void(const std::string&)>& callback) override; |
| 54 bool HasCreditCardScanFeature() override; | 57 bool HasCreditCardScanFeature() override; |
| 55 void ScanCreditCard(const CreditCardScanCallback& callback) override; | 58 void ScanCreditCard(const CreditCardScanCallback& callback) override; |
| 56 void ShowAutofillPopup( | 59 void ShowAutofillPopup( |
| 57 const gfx::RectF& element_bounds, | 60 const gfx::RectF& element_bounds, |
| 58 base::i18n::TextDirection text_direction, | 61 base::i18n::TextDirection text_direction, |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 99 std::unique_ptr<rappor::TestRapporServiceImpl> rappor_service_; | 102 std::unique_ptr<rappor::TestRapporServiceImpl> rappor_service_; |
| 100 ukm::UkmServiceTestingHarness ukm_service_test_harness_; | 103 ukm::UkmServiceTestingHarness ukm_service_test_harness_; |
| 101 GURL form_origin_; | 104 GURL form_origin_; |
| 102 | 105 |
| 103 DISALLOW_COPY_AND_ASSIGN(TestAutofillClient); | 106 DISALLOW_COPY_AND_ASSIGN(TestAutofillClient); |
| 104 }; | 107 }; |
| 105 | 108 |
| 106 } // namespace autofill | 109 } // namespace autofill |
| 107 | 110 |
| 108 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_TEST_AUTOFILL_CLIENT_H_ | 111 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_TEST_AUTOFILL_CLIENT_H_ |
| OLD | NEW |