| 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 | 90 |
| 91 void AutofillClientIOS::ConfirmSaveCreditCardLocally( | 91 void AutofillClientIOS::ConfirmSaveCreditCardLocally( |
| 92 const CreditCard& card, | 92 const CreditCard& card, |
| 93 const base::Closure& callback) { | 93 const base::Closure& callback) { |
| 94 // This method is invoked synchronously from | 94 // This method is invoked synchronously from |
| 95 // AutofillManager::OnFormSubmitted(); at the time of detecting that a form | 95 // AutofillManager::OnFormSubmitted(); at the time of detecting that a form |
| 96 // was submitted, the WebContents is guaranteed to be live. Since the | 96 // was submitted, the WebContents is guaranteed to be live. Since the |
| 97 // InfoBarService is a WebContentsUserData, it must also be alive at this | 97 // InfoBarService is a WebContentsUserData, it must also be alive at this |
| 98 // time. | 98 // time. |
| 99 infobar_manager_->AddInfoBar(CreateSaveCardInfoBarMobile( | 99 infobar_manager_->AddInfoBar(CreateSaveCardInfoBarMobile( |
| 100 base::WrapUnique(new AutofillSaveCardInfoBarDelegateMobile( | 100 base::MakeUnique<AutofillSaveCardInfoBarDelegateMobile>( |
| 101 false, card, std::unique_ptr<base::DictionaryValue>(nullptr), | 101 false, card, std::unique_ptr<base::DictionaryValue>(nullptr), |
| 102 callback)))); | 102 callback))); |
| 103 } | 103 } |
| 104 | 104 |
| 105 void AutofillClientIOS::ConfirmSaveCreditCardToCloud( | 105 void AutofillClientIOS::ConfirmSaveCreditCardToCloud( |
| 106 const CreditCard& card, | 106 const CreditCard& card, |
| 107 std::unique_ptr<base::DictionaryValue> legal_message, | 107 std::unique_ptr<base::DictionaryValue> legal_message, |
| 108 const base::Closure& callback) { | 108 const base::Closure& callback) { |
| 109 infobar_manager_->AddInfoBar(CreateSaveCardInfoBarMobile( | 109 infobar_manager_->AddInfoBar(CreateSaveCardInfoBarMobile( |
| 110 base::WrapUnique(new AutofillSaveCardInfoBarDelegateMobile( | 110 base::MakeUnique<AutofillSaveCardInfoBarDelegateMobile>( |
| 111 true, card, std::move(legal_message), callback)))); | 111 true, card, std::move(legal_message), callback))); |
| 112 } | 112 } |
| 113 | 113 |
| 114 void AutofillClientIOS::ConfirmCreditCardFillAssist( | 114 void AutofillClientIOS::ConfirmCreditCardFillAssist( |
| 115 const CreditCard& card, | 115 const CreditCard& card, |
| 116 const base::Closure& callback) { | 116 const base::Closure& callback) { |
| 117 auto infobar_delegate = | 117 auto infobar_delegate = |
| 118 base::MakeUnique<AutofillCreditCardFillingInfoBarDelegateMobile>( | 118 base::MakeUnique<AutofillCreditCardFillingInfoBarDelegateMobile>( |
| 119 card, callback); | 119 card, callback); |
| 120 auto* raw_delegate = infobar_delegate.get(); | 120 auto* raw_delegate = infobar_delegate.get(); |
| 121 if (infobar_manager_->AddInfoBar( | 121 if (infobar_manager_->AddInfoBar( |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 | 192 |
| 193 bool AutofillClientIOS::ShouldShowSigninPromo() { | 193 bool AutofillClientIOS::ShouldShowSigninPromo() { |
| 194 return false; | 194 return false; |
| 195 } | 195 } |
| 196 | 196 |
| 197 void AutofillClientIOS::StartSigninFlow() { | 197 void AutofillClientIOS::StartSigninFlow() { |
| 198 NOTIMPLEMENTED(); | 198 NOTIMPLEMENTED(); |
| 199 } | 199 } |
| 200 | 200 |
| 201 } // namespace autofill | 201 } // namespace autofill |
| OLD | NEW |