| 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/test_autofill_client.h" | 5 #include "components/autofill/core/browser/test_autofill_client.h" |
| 6 #include "components/autofill/core/browser/ui/mock_save_card_bubble_controller.h
" |
| 6 | 7 |
| 7 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h" | 8 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h" |
| 8 | 9 |
| 9 namespace autofill { | 10 namespace autofill { |
| 10 | 11 |
| 11 TestAutofillClient::TestAutofillClient() | 12 TestAutofillClient::TestAutofillClient() |
| 12 : token_service_(new FakeOAuth2TokenService()), | 13 : token_service_(new FakeOAuth2TokenService()), |
| 13 identity_provider_(new FakeIdentityProvider(token_service_.get())), | 14 identity_provider_(new FakeIdentityProvider(token_service_.get())), |
| 14 rappor_service_(new rappor::TestRapporServiceImpl()), | 15 rappor_service_(new rappor::TestRapporServiceImpl()), |
| 15 form_origin_(GURL("https://example.test")) {} | 16 form_origin_(GURL("https://example.test")) {} |
| (...skipping 22 matching lines...) Expand all Loading... |
| 38 } | 39 } |
| 39 | 40 |
| 40 rappor::RapporServiceImpl* TestAutofillClient::GetRapporServiceImpl() { | 41 rappor::RapporServiceImpl* TestAutofillClient::GetRapporServiceImpl() { |
| 41 return rappor_service_.get(); | 42 return rappor_service_.get(); |
| 42 } | 43 } |
| 43 | 44 |
| 44 ukm::UkmService* TestAutofillClient::GetUkmService() { | 45 ukm::UkmService* TestAutofillClient::GetUkmService() { |
| 45 return ukm_service_test_harness_.test_ukm_service(); | 46 return ukm_service_test_harness_.test_ukm_service(); |
| 46 } | 47 } |
| 47 | 48 |
| 49 #if !defined(OS_ANDROID) |
| 50 SaveCardBubbleController* TestAutofillClient::GetSaveCardBubbleController() { |
| 51 return new MockSaveCardBubbleController(); |
| 52 } |
| 53 #endif |
| 54 |
| 48 void TestAutofillClient::ShowAutofillSettings() { | 55 void TestAutofillClient::ShowAutofillSettings() { |
| 49 } | 56 } |
| 50 | 57 |
| 51 void TestAutofillClient::ShowUnmaskPrompt( | 58 void TestAutofillClient::ShowUnmaskPrompt( |
| 52 const CreditCard& card, | 59 const CreditCard& card, |
| 53 UnmaskCardReason reason, | 60 UnmaskCardReason reason, |
| 54 base::WeakPtr<CardUnmaskDelegate> delegate) { | 61 base::WeakPtr<CardUnmaskDelegate> delegate) { |
| 55 } | 62 } |
| 56 | 63 |
| 57 void TestAutofillClient::OnUnmaskVerificationResult(PaymentsRpcResult result) { | 64 void TestAutofillClient::OnUnmaskVerificationResult(PaymentsRpcResult result) { |
| 58 } | 65 } |
| 59 | 66 |
| 60 void TestAutofillClient::ConfirmSaveCreditCardLocally( | 67 void TestAutofillClient::ConfirmSaveCreditCardLocally( |
| 61 const CreditCard& card, | 68 const CreditCard& card, |
| 62 const base::Closure& callback) { | 69 const base::Closure& callback) { |
| 63 } | 70 } |
| 64 | 71 |
| 65 void TestAutofillClient::ConfirmSaveCreditCardToCloud( | 72 void TestAutofillClient::ConfirmSaveCreditCardToCloud( |
| 66 const CreditCard& card, | 73 const CreditCard& card, |
| 67 std::unique_ptr<base::DictionaryValue> legal_message, | 74 std::unique_ptr<base::DictionaryValue> legal_message, |
| 75 bool should_cvc_be_requested, |
| 68 const base::Closure& callback) { | 76 const base::Closure& callback) { |
| 69 callback.Run(); | 77 callback.Run(); |
| 70 } | 78 } |
| 71 | 79 |
| 72 void TestAutofillClient::ConfirmCreditCardFillAssist( | 80 void TestAutofillClient::ConfirmCreditCardFillAssist( |
| 73 const CreditCard& card, | 81 const CreditCard& card, |
| 74 const base::Closure& callback) { | 82 const base::Closure& callback) { |
| 75 callback.Run(); | 83 callback.Run(); |
| 76 } | 84 } |
| 77 | 85 |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 | 135 |
| 128 bool TestAutofillClient::ShouldShowSigninPromo() { | 136 bool TestAutofillClient::ShouldShowSigninPromo() { |
| 129 return false; | 137 return false; |
| 130 } | 138 } |
| 131 | 139 |
| 132 void TestAutofillClient::StartSigninFlow() {} | 140 void TestAutofillClient::StartSigninFlow() {} |
| 133 | 141 |
| 134 void TestAutofillClient::ShowHttpNotSecureExplanation() {} | 142 void TestAutofillClient::ShowHttpNotSecureExplanation() {} |
| 135 | 143 |
| 136 } // namespace autofill | 144 } // namespace autofill |
| OLD | NEW |