Chromium Code Reviews| Index: components/password_manager/core/browser/password_autofill_manager.cc |
| diff --git a/components/password_manager/core/browser/password_autofill_manager.cc b/components/password_manager/core/browser/password_autofill_manager.cc |
| index 7257057a95ecc572a1462bdc9ca4b5014b5c14de..0a58fabd0b9db879a62a9280a882064f12dca6f4 100644 |
| --- a/components/password_manager/core/browser/password_autofill_manager.cc |
| +++ b/components/password_manager/core/browser/password_autofill_manager.cc |
| @@ -218,11 +218,20 @@ void PasswordAutofillManager::OnShowPasswordSuggestions( |
| if (!is_context_secure && |
| choice == security_state::switches:: |
| kMarkHttpWithPasswordsOrCcWithChipAndFormWarning) { |
| + std::string icon_str; |
| + |
| + // Show http info icon for http sites. |
| + if (origin.is_valid() && origin.SchemeIs("http")) { |
| + icon_str = "http"; |
| + } else { |
| + // Show https_invalid icon for broken https sites. |
| + icon_str = "httpsInvalid"; |
| + } |
| + |
| autofill::Suggestion password_field_http_warning_suggestion( |
| - l10n_util::GetStringUTF16( |
| - IDS_AUTOFILL_PASSWORD_HTTP_WARNING_MESSAGE)); |
| - password_field_http_warning_suggestion.frontend_id = |
| - autofill::POPUP_ITEM_ID_HTTP_NOT_SECURE_WARNING_MESSAGE; |
| + l10n_util::GetStringUTF8(IDS_AUTOFILL_PASSWORD_HTTP_WARNING_MESSAGE), |
| + "", icon_str, |
|
vabr (Chromium)
2016/11/15 17:46:04
nit: Please use std::string() instead of "". The f
lshang
2016/11/16 10:33:08
Done.
|
| + autofill::POPUP_ITEM_ID_HTTP_NOT_SECURE_WARNING_MESSAGE); |
| suggestions.insert(suggestions.begin(), |
| password_field_http_warning_suggestion); |
| } |