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

Unified Diff: chrome/browser/ui/autofill/chrome_autofill_client.cc

Issue 2026353002: [Autofill] Credit Card Assist Infobar (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cleaning 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
Index: chrome/browser/ui/autofill/chrome_autofill_client.cc
diff --git a/chrome/browser/ui/autofill/chrome_autofill_client.cc b/chrome/browser/ui/autofill/chrome_autofill_client.cc
index e9d87562a8b12e079bc893994071e8c0457f3528..b07197148b8ce6a0d9d4ad1adb1d3adf91f672f8 100644
--- a/chrome/browser/ui/autofill/chrome_autofill_client.cc
+++ b/chrome/browser/ui/autofill/chrome_autofill_client.cc
@@ -14,7 +14,6 @@
#include "chrome/browser/autofill/personal_data_manager_factory.h"
#include "chrome/browser/autofill/risk_util.h"
#include "chrome/browser/browser_process.h"
-#include "chrome/browser/infobars/infobar_service.h"
#include "chrome/browser/password_manager/chrome_password_manager_client.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_manager.h"
@@ -62,6 +61,9 @@
#if defined(OS_ANDROID)
#include "base/android/context_utils.h"
#include "chrome/browser/android/signin/signin_promo_util_android.h"
+#include "chrome/browser/infobars/infobar_service.h"
+#include "chrome/browser/ui/android/infobars/autofill_credit_card_filling_infobar.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/infobars/core/infobar.h"
@@ -211,6 +213,22 @@ void ChromeAutofillClient::ConfirmSaveCreditCardToCloud(
#endif
}
+void ChromeAutofillClient::ConfirmCreditCardFillAssist(
+ const CreditCard& card,
+ const base::Closure& callback) {
+#if defined(OS_ANDROID)
+ auto infobar_delegate =
+ base::MakeUnique<AutofillCreditCardFillingInfoBarDelegateMobile>(
+ card, callback);
+ auto* raw_delegate = infobar_delegate.get();
+ if (InfoBarService::FromWebContents(web_contents())->AddInfoBar(
+ base::MakeUnique<AutofillCreditCardFillingInfoBar>(
+ std::move(infobar_delegate)))) {
+ raw_delegate->set_was_shown();
+ }
+#endif
+}
+
void ChromeAutofillClient::LoadRiskData(
const base::Callback<void(const std::string&)>& callback) {
::autofill::LoadRiskData(0, web_contents(), callback);
« no previous file with comments | « chrome/browser/ui/autofill/chrome_autofill_client.h ('k') | chrome/browser/ui/cocoa/autofill/save_card_bubble_view_bridge.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698