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

Unified Diff: chrome/browser/ssl/chrome_security_state_model_client.cc

Issue 2483423002: HTTP Bad: Split out UMA metrics for password vs credit card "Not secure" warnings (Closed)
Patch Set: 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: chrome/browser/ssl/chrome_security_state_model_client.cc
diff --git a/chrome/browser/ssl/chrome_security_state_model_client.cc b/chrome/browser/ssl/chrome_security_state_model_client.cc
index 91f94b325332b079b5805f7ff5e3650b51ffeed4..f43d47c7c9579f5ca8eeb88fd0deb8e941afb0fc 100644
--- a/chrome/browser/ssl/chrome_security_state_model_client.cc
+++ b/chrome/browser/ssl/chrome_security_state_model_client.cc
@@ -195,7 +195,8 @@ blink::WebSecurityStyle ChromeSecurityStateModelClient::GetSecurityStyle(
l10n_util::GetStringUTF8(IDS_PRIVATE_USER_DATA_INPUT_DESCRIPTION)));
} else if (security_info.security_level ==
security_state::SecurityStateModel::NONE &&
- security_info.displayed_private_user_data_input_on_http) {
+ (security_info.displayed_password_field_on_http ||
+ security_info.displayed_credit_card_field_on_http)) {
// If the HTTP_SHOW_WARNING field trial isn't in use yet, display an
// informational note that the omnibox will contain a warning for
// this site in a future version of Chrome.
@@ -333,7 +334,8 @@ void ChromeSecurityStateModelClient::VisibleSecurityStateChanged() {
security_state::SecurityStateModel::SecurityInfo security_info;
GetSecurityInfo(&security_info);
- if (!security_info.displayed_private_user_data_input_on_http)
+ if (!security_info.displayed_password_field_on_http &&
+ !security_info.displayed_credit_card_field_on_http)
estark 2016/11/09 15:56:46 nit: now that the conditional spans two lines, can
lshang 2016/11/10 04:53:54 Done.
return;
std::string warning;
@@ -360,8 +362,15 @@ void ChromeSecurityStateModelClient::VisibleSecurityStateChanged() {
logged_http_warning_on_current_navigation_ = true;
web_contents_->GetMainFrame()->AddMessageToConsole(
content::CONSOLE_MESSAGE_LEVEL_WARNING, warning);
- UMA_HISTOGRAM_BOOLEAN("Security.HTTPBad.UserWarnedAboutSensitiveInput",
- warning_is_user_visible);
+
+ UMA_HISTOGRAM_BOOLEAN(
+ "Security.HTTPBad.UserWarnedAboutSensitiveInput.CreditCard",
+ security_info.displayed_credit_card_field_on_http &&
estark 2016/11/09 15:56:46 Hmm. I think we ought to only record the histogram
lshang 2016/11/10 04:53:54 Done.
+ warning_is_user_visible);
+ UMA_HISTOGRAM_BOOLEAN(
+ "Security.HTTPBad.UserWarnedAboutSensitiveInput.Password",
+ security_info.displayed_password_field_on_http &&
+ warning_is_user_visible);
}
void ChromeSecurityStateModelClient::DidFinishNavigation(

Powered by Google App Engine
This is Rietveld 408576698