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

Unified Diff: ios/chrome/browser/ui/autofill/autofill_client_ios.mm

Issue 2612583002: Remove ChromeBrowserProvider::CreateCardUnmaskPromptView(). (Closed)
Patch Set: Fix grammar in comments. Created 3 years, 12 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 side-by-side diff with in-line comments
Download patch
Index: ios/chrome/browser/ui/autofill/autofill_client_ios.mm
diff --git a/ios/chrome/browser/ui/autofill/autofill_client_ios.mm b/ios/chrome/browser/ui/autofill/autofill_client_ios.mm
index 9447a8fdcf0637a7195080741ce62b7dee0b8f26..427c05435696d45cdc7c9f886c3ea705b9e84b16 100644
--- a/ios/chrome/browser/ui/autofill/autofill_client_ios.mm
+++ b/ios/chrome/browser/ui/autofill/autofill_client_ios.mm
@@ -24,6 +24,7 @@
#include "ios/chrome/browser/autofill/personal_data_manager_factory.h"
#include "ios/chrome/browser/browser_state/chrome_browser_state.h"
#include "ios/chrome/browser/infobars/infobar_utils.h"
+#include "ios/chrome/browser/ui/autofill/card_unmask_prompt_view_bridge.h"
#include "ios/chrome/browser/web_data_service_factory.h"
#include "ios/public/provider/chrome/browser/chrome_browser_provider.h"
@@ -77,10 +78,11 @@ void AutofillClientIOS::ShowUnmaskPrompt(
const CreditCard& card,
UnmaskCardReason reason,
base::WeakPtr<CardUnmaskDelegate> delegate) {
- ios::ChromeBrowserProvider* provider = ios::GetChromeBrowserProvider();
unmask_controller_.ShowPrompt(
- provider->CreateCardUnmaskPromptView(&unmask_controller_), card, reason,
- delegate);
+ // autofill::CardUnmaskPromptViewBridge manages its own lifetime, so
+ // do not use std::unique_ptr<> here.
+ new autofill::CardUnmaskPromptViewBridge(&unmask_controller_), card,
+ reason, delegate);
}
void AutofillClientIOS::OnUnmaskVerificationResult(PaymentsRpcResult result) {
« 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