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

Side by Side Diff: ios/chrome/browser/ui/autofill/autofill_client_ios.mm

Issue 2612583002: Remove ChromeBrowserProvider::CreateCardUnmaskPromptView(). (Closed)
Patch Set: Created 3 years, 11 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #import "ios/chrome/browser/ui/autofill/autofill_client_ios.h" 5 #import "ios/chrome/browser/ui/autofill/autofill_client_ios.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
11 #include "components/autofill/core/browser/autofill_credit_card_filling_infobar_ delegate_mobile.h" 11 #include "components/autofill/core/browser/autofill_credit_card_filling_infobar_ delegate_mobile.h"
12 #include "components/autofill/core/browser/autofill_save_card_infobar_delegate_m obile.h" 12 #include "components/autofill/core/browser/autofill_save_card_infobar_delegate_m obile.h"
13 #include "components/autofill/core/browser/autofill_save_card_infobar_mobile.h" 13 #include "components/autofill/core/browser/autofill_save_card_infobar_mobile.h"
14 #include "components/autofill/core/browser/ui/card_unmask_prompt_view.h" 14 #include "components/autofill/core/browser/ui/card_unmask_prompt_view.h"
15 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h" 15 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h"
16 #include "components/autofill/core/common/autofill_pref_names.h" 16 #include "components/autofill/core/common/autofill_pref_names.h"
17 #include "components/infobars/core/infobar.h" 17 #include "components/infobars/core/infobar.h"
18 #include "components/infobars/core/infobar_manager.h" 18 #include "components/infobars/core/infobar_manager.h"
19 #include "components/keyed_service/core/service_access_type.h" 19 #include "components/keyed_service/core/service_access_type.h"
20 #include "components/password_manager/core/browser/password_generation_manager.h " 20 #include "components/password_manager/core/browser/password_generation_manager.h "
21 #include "components/prefs/pref_service.h" 21 #include "components/prefs/pref_service.h"
22 #include "google_apis/gaia/identity_provider.h" 22 #include "google_apis/gaia/identity_provider.h"
23 #include "ios/chrome/browser/application_context.h" 23 #include "ios/chrome/browser/application_context.h"
24 #include "ios/chrome/browser/autofill/personal_data_manager_factory.h" 24 #include "ios/chrome/browser/autofill/personal_data_manager_factory.h"
25 #include "ios/chrome/browser/browser_state/chrome_browser_state.h" 25 #include "ios/chrome/browser/browser_state/chrome_browser_state.h"
26 #include "ios/chrome/browser/infobars/infobar_utils.h" 26 #include "ios/chrome/browser/infobars/infobar_utils.h"
27 #include "ios/chrome/browser/ui/autofill/card_unmask_prompt_view_bridge.h"
27 #include "ios/chrome/browser/web_data_service_factory.h" 28 #include "ios/chrome/browser/web_data_service_factory.h"
28 #include "ios/public/provider/chrome/browser/chrome_browser_provider.h" 29 #include "ios/public/provider/chrome/browser/chrome_browser_provider.h"
29 30
30 namespace autofill { 31 namespace autofill {
31 32
32 AutofillClientIOS::AutofillClientIOS( 33 AutofillClientIOS::AutofillClientIOS(
33 ios::ChromeBrowserState* browser_state, 34 ios::ChromeBrowserState* browser_state,
34 infobars::InfoBarManager* infobar_manager, 35 infobars::InfoBarManager* infobar_manager,
35 id<AutofillClientIOSBridge> bridge, 36 id<AutofillClientIOSBridge> bridge,
36 password_manager::PasswordGenerationManager* password_generation_manager, 37 password_manager::PasswordGenerationManager* password_generation_manager,
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 } 71 }
71 72
72 void AutofillClientIOS::ShowAutofillSettings() { 73 void AutofillClientIOS::ShowAutofillSettings() {
73 NOTREACHED(); 74 NOTREACHED();
74 } 75 }
75 76
76 void AutofillClientIOS::ShowUnmaskPrompt( 77 void AutofillClientIOS::ShowUnmaskPrompt(
77 const CreditCard& card, 78 const CreditCard& card,
78 UnmaskCardReason reason, 79 UnmaskCardReason reason,
79 base::WeakPtr<CardUnmaskDelegate> delegate) { 80 base::WeakPtr<CardUnmaskDelegate> delegate) {
80 ios::ChromeBrowserProvider* provider = ios::GetChromeBrowserProvider();
81 unmask_controller_.ShowPrompt( 81 unmask_controller_.ShowPrompt(
82 provider->CreateCardUnmaskPromptView(&unmask_controller_), card, reason, 82 // autofill::CardUnmaskPromptViewBridge manages it's own lifetime, so
rohitrao (ping after 24h) 2017/01/03 16:23:01 Typo: its.
sdefresne 2017/01/03 16:59:20 Done.
83 delegate); 83 // do not use std::unique_ptr<> here.
84 new autofill::CardUnmaskPromptViewBridge(&unmask_controller_), card,
85 reason, delegate);
84 } 86 }
85 87
86 void AutofillClientIOS::OnUnmaskVerificationResult(PaymentsRpcResult result) { 88 void AutofillClientIOS::OnUnmaskVerificationResult(PaymentsRpcResult result) {
87 unmask_controller_.OnVerificationResult(result); 89 unmask_controller_.OnVerificationResult(result);
88 } 90 }
89 91
90 void AutofillClientIOS::ConfirmSaveCreditCardLocally( 92 void AutofillClientIOS::ConfirmSaveCreditCardLocally(
91 const CreditCard& card, 93 const CreditCard& card,
92 const base::Closure& callback) { 94 const base::Closure& callback) {
93 // This method is invoked synchronously from 95 // This method is invoked synchronously from
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 197
196 void AutofillClientIOS::StartSigninFlow() { 198 void AutofillClientIOS::StartSigninFlow() {
197 NOTIMPLEMENTED(); 199 NOTIMPLEMENTED();
198 } 200 }
199 201
200 void AutofillClientIOS::ShowHttpNotSecureExplanation() { 202 void AutofillClientIOS::ShowHttpNotSecureExplanation() {
201 NOTIMPLEMENTED(); 203 NOTIMPLEMENTED();
202 } 204 }
203 205
204 } // namespace autofill 206 } // namespace autofill
OLDNEW
« no previous file with comments | « ios/chrome/browser/ui/autofill/BUILD.gn ('k') | ios/public/provider/chrome/browser/chrome_browser_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698