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

Unified Diff: components/autofill/core/browser/autofill_external_delegate.cc

Issue 2496683003: Http Bad: Add a PopupItemId to identify http warning message (Closed)
Patch Set: minor change Created 4 years, 1 month 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: components/autofill/core/browser/autofill_external_delegate.cc
diff --git a/components/autofill/core/browser/autofill_external_delegate.cc b/components/autofill/core/browser/autofill_external_delegate.cc
index 96a96c348790d6920f67b7bf25b5b8c18a43aeff..096036c8d9e0d93f0c1634b5bfe8678a3963ab3d 100644
--- a/components/autofill/core/browser/autofill_external_delegate.cc
+++ b/components/autofill/core/browser/autofill_external_delegate.cc
@@ -33,7 +33,8 @@ namespace {
// Returns true if the suggestion entry is an Autofill warning message.
// Warning message should display on top of suggestion list.
Mathieu 2016/11/12 12:52:05 nit: Warning messages*
lshang 2016/11/14 10:51:01 Done.
bool IsAutofillWarningEntry(int frontend_id) {
- return frontend_id == POPUP_ITEM_ID_WARNING_MESSAGE;
+ return frontend_id == POPUP_ITEM_ID_WARNING_MESSAGE ||
+ frontend_id == POPUP_ITEM_ID_HTTP_NOT_SECURE_WARNING_MESSAGE;
}
} // anonymous namespace
@@ -293,7 +294,8 @@ void AutofillExternalDelegate::OnCreditCardScanned(const CreditCard& card) {
void AutofillExternalDelegate::FillAutofillFormData(int unique_id,
bool is_preview) {
// If the selected element is a warning we don't want to do anything.
- if (unique_id == POPUP_ITEM_ID_WARNING_MESSAGE)
+ if (unique_id == POPUP_ITEM_ID_WARNING_MESSAGE ||
Mathieu 2016/11/12 12:52:05 reuse IsAutofillWarningEntry()?
lshang 2016/11/14 10:51:01 Done.
+ unique_id == POPUP_ITEM_ID_HTTP_NOT_SECURE_WARNING_MESSAGE)
return;
AutofillDriver::RendererFormDataAction renderer_action = is_preview ?

Powered by Google App Engine
This is Rietveld 408576698