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 | 6 |
7 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h" | 7 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h" |
8 | 8 |
| 9 #if defined(OS_ANDROID) |
| 10 #include "components/infobars/core/infobar.h" |
| 11 #endif |
| 12 |
9 namespace autofill { | 13 namespace autofill { |
10 | 14 |
11 TestAutofillClient::TestAutofillClient() | 15 TestAutofillClient::TestAutofillClient() |
12 : token_service_(new FakeOAuth2TokenService()), | 16 : token_service_(new FakeOAuth2TokenService()), |
13 identity_provider_(new FakeIdentityProvider(token_service_.get())), | 17 identity_provider_(new FakeIdentityProvider(token_service_.get())), |
14 rappor_service_(new rappor::TestRapporService()), | 18 rappor_service_(new rappor::TestRapporService()), |
15 is_context_secure_(true) { | 19 is_context_secure_(true) { |
16 } | 20 } |
17 | 21 |
18 TestAutofillClient::~TestAutofillClient() { | 22 TestAutofillClient::~TestAutofillClient() { |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 const base::Closure& callback) { | 63 const base::Closure& callback) { |
60 } | 64 } |
61 | 65 |
62 void TestAutofillClient::ConfirmSaveCreditCardToCloud( | 66 void TestAutofillClient::ConfirmSaveCreditCardToCloud( |
63 const CreditCard& card, | 67 const CreditCard& card, |
64 std::unique_ptr<base::DictionaryValue> legal_message, | 68 std::unique_ptr<base::DictionaryValue> legal_message, |
65 const base::Closure& callback) { | 69 const base::Closure& callback) { |
66 callback.Run(); | 70 callback.Run(); |
67 } | 71 } |
68 | 72 |
| 73 void TestAutofillClient::ConfirmCreditCardFillAssist( |
| 74 const CreditCard& card, |
| 75 const base::Closure& callback) { |
| 76 callback.Run(); |
| 77 } |
| 78 |
| 79 #if defined(OS_ANDROID) |
| 80 std::unique_ptr<infobars::InfoBar> |
| 81 TestAutofillClient::CreateCreditCardFillingInfoBar( |
| 82 std::unique_ptr<AutofillCreditCardFillingInfoBarDelegateMobile> delegate) { |
| 83 return std::unique_ptr<infobars::InfoBar>(); |
| 84 } |
| 85 #endif |
| 86 |
69 void TestAutofillClient::LoadRiskData( | 87 void TestAutofillClient::LoadRiskData( |
70 const base::Callback<void(const std::string&)>& callback) { | 88 const base::Callback<void(const std::string&)>& callback) { |
71 callback.Run("some risk data"); | 89 callback.Run("some risk data"); |
72 } | 90 } |
73 | 91 |
74 bool TestAutofillClient::HasCreditCardScanFeature() { | 92 bool TestAutofillClient::HasCreditCardScanFeature() { |
75 return false; | 93 return false; |
76 } | 94 } |
77 | 95 |
78 void TestAutofillClient::ScanCreditCard( | 96 void TestAutofillClient::ScanCreditCard( |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 return is_context_secure_; | 133 return is_context_secure_; |
116 } | 134 } |
117 | 135 |
118 bool TestAutofillClient::ShouldShowSigninPromo() { | 136 bool TestAutofillClient::ShouldShowSigninPromo() { |
119 return false; | 137 return false; |
120 } | 138 } |
121 | 139 |
122 void TestAutofillClient::StartSigninFlow() {} | 140 void TestAutofillClient::StartSigninFlow() {} |
123 | 141 |
124 } // namespace autofill | 142 } // namespace autofill |
OLD | NEW |