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

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

Issue 2212063002: [Autofill] Implement Autofill Assistant infobar for iOS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix ifdef Created 4 years, 4 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
« no previous file with comments | « components/autofill_strings.grdp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 b8a2e7fa9091f017a0cb0f2e9490cb9b33060a20..31d79569b4c0aa78046ac71dec23521f605ea9e2 100644
--- a/ios/chrome/browser/ui/autofill/autofill_client_ios.mm
+++ b/ios/chrome/browser/ui/autofill/autofill_client_ios.mm
@@ -8,6 +8,7 @@
#include "base/bind.h"
#include "base/memory/ptr_util.h"
+#include "components/autofill/core/browser/autofill_credit_card_filling_infobar_delegate_mobile.h"
#include "components/autofill/core/browser/autofill_save_card_infobar_delegate_mobile.h"
#include "components/autofill/core/browser/autofill_save_card_infobar_mobile.h"
#include "components/autofill/core/browser/ui/card_unmask_prompt_view.h"
@@ -22,6 +23,7 @@
#include "ios/chrome/browser/application_context.h"
#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/web_data_service_factory.h"
#include "ios/public/provider/chrome/browser/chrome_browser_provider.h"
@@ -112,7 +114,14 @@ void AutofillClientIOS::ConfirmSaveCreditCardToCloud(
void AutofillClientIOS::ConfirmCreditCardFillAssist(
const CreditCard& card,
const base::Closure& callback) {
- NOTREACHED();
+ auto infobar_delegate =
+ base::MakeUnique<AutofillCreditCardFillingInfoBarDelegateMobile>(
+ card, callback);
+ auto* raw_delegate = infobar_delegate.get();
+ if (infobar_manager_->AddInfoBar(
+ ::CreateConfirmInfoBar(std::move(infobar_delegate)))) {
+ raw_delegate->set_was_shown();
+ }
}
void AutofillClientIOS::LoadRiskData(
« no previous file with comments | « components/autofill_strings.grdp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698