| 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 ca159ec0f37442f0cd4f97a2601ba3bc33dd2445..4c2be9058dcb93857aca0fdcbc3e99841f927d6d 100644
|
| --- a/chrome/browser/ui/autofill/chrome_autofill_client.cc
|
| +++ b/chrome/browser/ui/autofill/chrome_autofill_client.cc
|
| @@ -53,6 +53,10 @@
|
| #include "components/ui/zoom/zoom_controller.h"
|
| #endif
|
|
|
| +#if BUILDFLAG(ANDROID_JAVA_UI) || defined(OS_IOS)
|
| +#include "components/autofill/core/browser/autofill_save_card_infobar_delegate_mobile.h"
|
| +#endif
|
| +
|
| DEFINE_WEB_CONTENTS_USER_DATA_KEY(autofill::ChromeAutofillClient);
|
|
|
| namespace autofill {
|
| @@ -174,8 +178,12 @@ void ChromeAutofillClient::OnUnmaskVerificationResult(
|
| }
|
|
|
| void ChromeAutofillClient::ConfirmSaveCreditCardLocally(
|
| + const CreditCard& card,
|
| const base::Closure& callback) {
|
| -#if !defined(OS_ANDROID)
|
| +#if BUILDFLAG(ANDROID_JAVA_UI) || defined(OS_IOS)
|
| + AutofillSaveCardInfoBarDelegateMobile::CreateForLocalSave(
|
| + InfoBarService::FromWebContents(web_contents()), card, callback);
|
| +#else
|
| if (IsSaveCardBubbleEnabled()) {
|
| // Do lazy initialization of SaveCardBubbleControllerImpl.
|
| autofill::SaveCardBubbleControllerImpl::CreateForWebContents(
|
| @@ -185,25 +193,27 @@ void ChromeAutofillClient::ConfirmSaveCreditCardLocally(
|
| controller->ShowBubbleForLocalSave(callback);
|
| return;
|
| }
|
| -#endif
|
| +
|
| AutofillCCInfoBarDelegate::CreateForLocalSave(
|
| InfoBarService::FromWebContents(web_contents()), callback);
|
| +#endif // BUILDFLAG(ANDROID_JAVA_UI) || defined(OS_IOS)
|
| }
|
|
|
| void ChromeAutofillClient::ConfirmSaveCreditCardToCloud(
|
| - const base::Closure& callback,
|
| - scoped_ptr<base::DictionaryValue> legal_message) {
|
| -// TODO(jdonnelly): Implement save card prompt for OS_IOS.
|
| -#if defined(OS_ANDROID)
|
| - AutofillCCInfoBarDelegate::CreateForUpload(
|
| - InfoBarService::FromWebContents(web_contents()), callback);
|
| + const CreditCard& card,
|
| + scoped_ptr<base::DictionaryValue> legal_message,
|
| + const base::Closure& callback) {
|
| +#if BUILDFLAG(ANDROID_JAVA_UI) || defined(OS_IOS)
|
| + AutofillSaveCardInfoBarDelegateMobile::CreateForUpload(
|
| + InfoBarService::FromWebContents(web_contents()), card,
|
| + std::move(legal_message), callback);
|
| #else
|
| // Do lazy initialization of SaveCardBubbleControllerImpl.
|
| autofill::SaveCardBubbleControllerImpl::CreateForWebContents(web_contents());
|
| autofill::SaveCardBubbleControllerImpl* controller =
|
| autofill::SaveCardBubbleControllerImpl::FromWebContents(web_contents());
|
| controller->ShowBubbleForUpload(callback, std::move(legal_message));
|
| -#endif
|
| +#endif // BUILDFLAG(ANDROID_JAVA_UI) || defined(OS_IOS)
|
| }
|
|
|
| void ChromeAutofillClient::LoadRiskData(
|
|
|