| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #import "ios/chrome/browser/ui/autofill/autofill_client_ios.h" | 5 #import "ios/chrome/browser/ui/autofill/autofill_client_ios.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 const CreditCard& card, | 111 const CreditCard& card, |
| 112 const base::Closure& callback) { | 112 const base::Closure& callback) { |
| 113 // This method is invoked synchronously from | 113 // This method is invoked synchronously from |
| 114 // AutofillManager::OnFormSubmitted(); at the time of detecting that a form | 114 // AutofillManager::OnFormSubmitted(); at the time of detecting that a form |
| 115 // was submitted, the WebContents is guaranteed to be live. Since the | 115 // was submitted, the WebContents is guaranteed to be live. Since the |
| 116 // InfoBarService is a WebContentsUserData, it must also be alive at this | 116 // InfoBarService is a WebContentsUserData, it must also be alive at this |
| 117 // time. | 117 // time. |
| 118 infobar_manager_->AddInfoBar(CreateSaveCardInfoBarMobile( | 118 infobar_manager_->AddInfoBar(CreateSaveCardInfoBarMobile( |
| 119 base::MakeUnique<AutofillSaveCardInfoBarDelegateMobile>( | 119 base::MakeUnique<AutofillSaveCardInfoBarDelegateMobile>( |
| 120 false, card, std::unique_ptr<base::DictionaryValue>(nullptr), | 120 false, card, std::unique_ptr<base::DictionaryValue>(nullptr), |
| 121 callback))); | 121 callback, GetPrefs()))); |
| 122 } | 122 } |
| 123 | 123 |
| 124 void AutofillClientIOS::ConfirmSaveCreditCardToCloud( | 124 void AutofillClientIOS::ConfirmSaveCreditCardToCloud( |
| 125 const CreditCard& card, | 125 const CreditCard& card, |
| 126 std::unique_ptr<base::DictionaryValue> legal_message, | 126 std::unique_ptr<base::DictionaryValue> legal_message, |
| 127 bool should_cvc_be_requested, | 127 bool should_cvc_be_requested, |
| 128 const base::Closure& callback) { | 128 const base::Closure& callback) { |
| 129 infobar_manager_->AddInfoBar(CreateSaveCardInfoBarMobile( | 129 infobar_manager_->AddInfoBar(CreateSaveCardInfoBarMobile( |
| 130 base::MakeUnique<AutofillSaveCardInfoBarDelegateMobile>( | 130 base::MakeUnique<AutofillSaveCardInfoBarDelegateMobile>( |
| 131 true, card, std::move(legal_message), callback))); | 131 true, card, std::move(legal_message), callback, GetPrefs()))); |
| 132 } | 132 } |
| 133 | 133 |
| 134 void AutofillClientIOS::ConfirmCreditCardFillAssist( | 134 void AutofillClientIOS::ConfirmCreditCardFillAssist( |
| 135 const CreditCard& card, | 135 const CreditCard& card, |
| 136 const base::Closure& callback) { | 136 const base::Closure& callback) { |
| 137 auto infobar_delegate = | 137 auto infobar_delegate = |
| 138 base::MakeUnique<AutofillCreditCardFillingInfoBarDelegateMobile>( | 138 base::MakeUnique<AutofillCreditCardFillingInfoBarDelegateMobile>( |
| 139 card, callback); | 139 card, callback); |
| 140 auto* raw_delegate = infobar_delegate.get(); | 140 auto* raw_delegate = infobar_delegate.get(); |
| 141 if (infobar_manager_->AddInfoBar( | 141 if (infobar_manager_->AddInfoBar( |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 | 220 |
| 221 void AutofillClientIOS::StartSigninFlow() { | 221 void AutofillClientIOS::StartSigninFlow() { |
| 222 NOTIMPLEMENTED(); | 222 NOTIMPLEMENTED(); |
| 223 } | 223 } |
| 224 | 224 |
| 225 void AutofillClientIOS::ShowHttpNotSecureExplanation() { | 225 void AutofillClientIOS::ShowHttpNotSecureExplanation() { |
| 226 NOTIMPLEMENTED(); | 226 NOTIMPLEMENTED(); |
| 227 } | 227 } |
| 228 | 228 |
| 229 } // namespace autofill | 229 } // namespace autofill |
| OLD | NEW |