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

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: rebase 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..a001916b227c7f8b74062d6b58f9f0b927dd1778 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,23 @@ 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();
+ std::unique_ptr<infobars::InfoBar> infobar(
+ base::MakeUnique<AutofillCreditCardFillingInfoBar>(
+ std::move(infobar_delegate)));
Evan Stade 2016/08/04 13:01:48 nit: all these std:: and base:: and autos make thi
Mathieu 2016/08/04 15:46:13 got rid of one std::move and std::unique_ptr<..> b
+ if (InfoBarService::FromWebContents(web_contents())->AddInfoBar(
+ std::move(infobar)))
Evan Stade 2016/08/04 13:01:48 nit: curlies
Mathieu 2016/08/04 15:46:13 Done.
+ 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