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

Side by Side Diff: components/autofill/core/browser/test_autofill_client.cc

Issue 2789843004: [Payments] Upload card UI now has a CVC prompt (Closed)
Patch Set: Fix Android build (accidentally omitted scoping class name) Created 3 years, 8 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 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 "
Evan Stade 2017/04/12 23:56:22 probably should only include on !android
Jared Saul 2017/04/13 00:42:35 Done.
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()),
16 #if !defined(OS_ANDROID)
17 save_card_bubble_controller_(new MockSaveCardBubbleController()),
18 #endif
15 form_origin_(GURL("https://example.test")) {} 19 form_origin_(GURL("https://example.test")) {}
16 20
17 TestAutofillClient::~TestAutofillClient() { 21 TestAutofillClient::~TestAutofillClient() {
18 } 22 }
19 23
20 PersonalDataManager* TestAutofillClient::GetPersonalDataManager() { 24 PersonalDataManager* TestAutofillClient::GetPersonalDataManager() {
21 return nullptr; 25 return nullptr;
22 } 26 }
23 27
24 scoped_refptr<AutofillWebDataService> TestAutofillClient::GetDatabase() { 28 scoped_refptr<AutofillWebDataService> TestAutofillClient::GetDatabase() {
(...skipping 13 matching lines...) Expand all
38 } 42 }
39 43
40 rappor::RapporServiceImpl* TestAutofillClient::GetRapporServiceImpl() { 44 rappor::RapporServiceImpl* TestAutofillClient::GetRapporServiceImpl() {
41 return rappor_service_.get(); 45 return rappor_service_.get();
42 } 46 }
43 47
44 ukm::UkmService* TestAutofillClient::GetUkmService() { 48 ukm::UkmService* TestAutofillClient::GetUkmService() {
45 return ukm_service_test_harness_.test_ukm_service(); 49 return ukm_service_test_harness_.test_ukm_service();
46 } 50 }
47 51
52 SaveCardBubbleController* TestAutofillClient::GetSaveCardBubbleController() {
53 #if defined(OS_ANDROID)
Evan Stade 2017/04/12 23:56:22 not necessary if you remove the ifdef from the hea
Jared Saul 2017/04/13 00:42:35 Acknowledged.
54 return nullptr;
55 #else
56 return save_card_bubble_controller_.get();
57 #endif
58 }
59
48 void TestAutofillClient::ShowAutofillSettings() { 60 void TestAutofillClient::ShowAutofillSettings() {
49 } 61 }
50 62
51 void TestAutofillClient::ShowUnmaskPrompt( 63 void TestAutofillClient::ShowUnmaskPrompt(
52 const CreditCard& card, 64 const CreditCard& card,
53 UnmaskCardReason reason, 65 UnmaskCardReason reason,
54 base::WeakPtr<CardUnmaskDelegate> delegate) { 66 base::WeakPtr<CardUnmaskDelegate> delegate) {
55 } 67 }
56 68
57 void TestAutofillClient::OnUnmaskVerificationResult(PaymentsRpcResult result) { 69 void TestAutofillClient::OnUnmaskVerificationResult(PaymentsRpcResult result) {
58 } 70 }
59 71
60 void TestAutofillClient::ConfirmSaveCreditCardLocally( 72 void TestAutofillClient::ConfirmSaveCreditCardLocally(
61 const CreditCard& card, 73 const CreditCard& card,
62 const base::Closure& callback) { 74 const base::Closure& callback) {
63 } 75 }
64 76
65 void TestAutofillClient::ConfirmSaveCreditCardToCloud( 77 void TestAutofillClient::ConfirmSaveCreditCardToCloud(
66 const CreditCard& card, 78 const CreditCard& card,
67 std::unique_ptr<base::DictionaryValue> legal_message, 79 std::unique_ptr<base::DictionaryValue> legal_message,
80 bool should_cvc_be_requested,
68 const base::Closure& callback) { 81 const base::Closure& callback) {
69 callback.Run(); 82 callback.Run();
70 } 83 }
71 84
72 void TestAutofillClient::ConfirmCreditCardFillAssist( 85 void TestAutofillClient::ConfirmCreditCardFillAssist(
73 const CreditCard& card, 86 const CreditCard& card,
74 const base::Closure& callback) { 87 const base::Closure& callback) {
75 callback.Run(); 88 callback.Run();
76 } 89 }
77 90
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 140
128 bool TestAutofillClient::ShouldShowSigninPromo() { 141 bool TestAutofillClient::ShouldShowSigninPromo() {
129 return false; 142 return false;
130 } 143 }
131 144
132 void TestAutofillClient::StartSigninFlow() {} 145 void TestAutofillClient::StartSigninFlow() {}
133 146
134 void TestAutofillClient::ShowHttpNotSecureExplanation() {} 147 void TestAutofillClient::ShowHttpNotSecureExplanation() {}
135 148
136 } // namespace autofill 149 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698