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

Unified Diff: chrome/browser/ui/website_settings/website_settings.cc

Issue 476513002: Add UMA histogram to count hard revokes of user certificate error decisions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase on ToT Created 6 years, 3 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 | « chrome/browser/ui/website_settings/website_settings.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/website_settings/website_settings.cc
diff --git a/chrome/browser/ui/website_settings/website_settings.cc b/chrome/browser/ui/website_settings/website_settings.cc
index b78e6440d6ddfb1cd240d6415e52e7e8a7b5ad45..c895a5c73b47aab5bbbbe64593e630cbbdca03f6 100644
--- a/chrome/browser/ui/website_settings/website_settings.cc
+++ b/chrome/browser/ui/website_settings/website_settings.cc
@@ -61,6 +61,13 @@ using content::BrowserThread;
namespace {
+// Events for UMA. Do not reorder or change!
+enum SSLCertificateDecisionsDidRevoke {
+ USER_CERT_DECISIONS_NOT_REVOKED = 0,
+ USER_CERT_DECISIONS_REVOKED,
+ END_OF_SSL_CERTIFICATE_DECISIONS_DID_REVOKE_ENUM
+};
+
// The list of content settings types to display on the Website Settings UI.
ContentSettingsType kPermissionType[] = {
CONTENT_SETTINGS_TYPE_IMAGES,
@@ -174,7 +181,8 @@ WebsiteSettings::WebsiteSettings(
cert_store_(cert_store),
content_settings_(profile->GetHostContentSettingsMap()),
chrome_ssl_host_state_delegate_(
- ChromeSSLHostStateDelegateFactory::GetForProfile(profile)) {
+ ChromeSSLHostStateDelegateFactory::GetForProfile(profile)),
+ did_revoke_user_ssl_decisions_(false) {
Init(profile, url, ssl);
HistoryService* history_service = HistoryServiceFactory::GetForProfile(
@@ -308,6 +316,20 @@ void WebsiteSettings::OnSiteDataAccessed() {
void WebsiteSettings::OnUIClosing() {
if (show_info_bar_)
WebsiteSettingsInfoBarDelegate::Create(infobar_service_);
+
+ SSLCertificateDecisionsDidRevoke user_decision =
+ did_revoke_user_ssl_decisions_ ? USER_CERT_DECISIONS_REVOKED
+ : USER_CERT_DECISIONS_NOT_REVOKED;
+
+ UMA_HISTOGRAM_ENUMERATION("interstitial.ssl.did_user_revoke_decisions",
+ user_decision,
+ END_OF_SSL_CERTIFICATE_DECISIONS_DID_REVOKE_ENUM);
+}
+
+void WebsiteSettings::OnRevokeSSLErrorBypassButtonPressed() {
+ DCHECK(chrome_ssl_host_state_delegate_);
+ chrome_ssl_host_state_delegate_->RevokeUserDecisionsHard(site_url().host());
+ did_revoke_user_ssl_decisions_ = true;
}
void WebsiteSettings::Init(Profile* profile,
« no previous file with comments | « chrome/browser/ui/website_settings/website_settings.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698