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

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

Issue 2451293002: Add a histogram for each time the HTTP Bad UI is shown (Closed)
Patch Set: Update VisibleSSLStateChange to VisibleSecurityStateChange Created 4 years, 2 months 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
« no previous file with comments | « no previous file | chrome/browser/ssl/chrome_security_state_model_client_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 0f1cb8be289cfe959fb2c9714ec0ace87abdd654..08e215a363e6ce7eef5009f44f16bcac461158f0 100644
--- a/chrome/browser/ssl/chrome_security_state_model_client.cc
+++ b/chrome/browser/ssl/chrome_security_state_model_client.cc
@@ -338,14 +338,17 @@ void ChromeSecurityStateModelClient::VisibleSecurityStateChanged() {
return;
std::string warning;
+ bool warning_is_user_visible = false;
switch (security_info.security_level) {
case security_state::SecurityStateModel::HTTP_SHOW_WARNING:
warning =
"This page includes a password or credit card input in a non-secure "
"context. A warning has been added to the URL bar. For more "
"information, see https://goo.gl/zmWq3m.";
+ warning_is_user_visible = true;
break;
case security_state::SecurityStateModel::NONE:
+ case security_state::SecurityStateModel::DANGEROUS:
warning =
"This page includes a password or credit card input in a non-secure "
"context. A warning will be added to the URL bar in Chrome 56 (Jan "
@@ -358,6 +361,8 @@ 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);
}
void ChromeSecurityStateModelClient::DidFinishNavigation(
« no previous file with comments | « no previous file | chrome/browser/ssl/chrome_security_state_model_client_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698