Chromium Code Reviews| Index: components/autofill/core/browser/autofill_assistant.cc |
| diff --git a/components/autofill/core/browser/autofill_assistant.cc b/components/autofill/core/browser/autofill_assistant.cc |
| index 982dd0591716353cf0a97e28c10aa2e7c2c85d75..f28655a353e8ff3a27214b1f0d4f76d1c68ed27c 100644 |
| --- a/components/autofill/core/browser/autofill_assistant.cc |
| +++ b/components/autofill/core/browser/autofill_assistant.cc |
| @@ -32,11 +32,13 @@ bool AutofillAssistant::CanShowCreditCardAssist( |
| for (FormStructure* cur_form : base::Reversed(form_structures)) { |
| if (cur_form->IsCompleteCreditCardForm()) { |
| - credit_card_form_data_.reset(new FormData(cur_form->ToFormData())); |
| + const FormData& cur_form_data = cur_form->ToFormData(); |
|
sebsg
2016/08/19 14:23:01
Since forms sometimes have a lot of fields, I thin
Roger McFarlane (Chromium)
2016/08/19 15:23:41
Done.
|
| + if (autofill_manager_->client()->IsContextSecure(cur_form_data.origin)) |
| + credit_card_form_data_.reset(new FormData(cur_form_data)); |
| break; |
| } |
| } |
| - return !!credit_card_form_data_; |
| + return credit_card_form_data_ != nullptr; |
| } |
| void AutofillAssistant::ShowAssistForCreditCard(const CreditCard& card) { |