| 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 92e884d2e473cf7fca140c1e4a2ad106c042dfd7..944b26cc8dac07b28cd81981e3fb10bf6b6fd086 100644
|
| --- a/chrome/browser/ui/website_settings/website_settings.cc
|
| +++ b/chrome/browser/ui/website_settings/website_settings.cc
|
| @@ -289,19 +289,29 @@ void WebsiteSettings::RecordWebsiteSettingsAction(
|
| action,
|
| WEBSITE_SETTINGS_COUNT);
|
|
|
| - // Use a separate histogram to record actions if they are done on a page with
|
| - // an HTTPS URL. Note that this *disregards* security status.
|
| - //
|
| -
|
| - // TODO(palmer): Consider adding a new histogram for
|
| - // GURL::SchemeIsCryptographic. (We don't want to replace this call with a
|
| - // call to that function because we don't want to change the meanings of
|
| - // existing metrics.) This would inform the decision to mark non-secure
|
| - // origins as Dubious or Non-Secure; the overall bug for that is
|
| - // crbug.com/454579.
|
| - if (site_url_.SchemeIs(url::kHttpsScheme)) {
|
| - UMA_HISTOGRAM_ENUMERATION("WebsiteSettings.Action.HttpsUrl",
|
| - action,
|
| + std::string histogram_name;
|
| +
|
| + if (site_url_.SchemeIsCryptographic()) {
|
| + if (security_level_ == security_state::SecurityStateModel::SECURE) {
|
| + UMA_HISTOGRAM_ENUMERATION("PageInfo.Action.HttpsUrl2", action,
|
| + WEBSITE_SETTINGS_COUNT);
|
| + } else if (security_level_ == security_state::SecurityStateModel::NONE) {
|
| + UMA_HISTOGRAM_ENUMERATION("PageInfo.Action.HttpsUrlDowngraded", action,
|
| + WEBSITE_SETTINGS_COUNT);
|
| + } else if (security_level_ ==
|
| + security_state::SecurityStateModel::DANGEROUS) {
|
| + UMA_HISTOGRAM_ENUMERATION("PageInfo.Action.HttpsUrlDangerous", action,
|
| + WEBSITE_SETTINGS_COUNT);
|
| + }
|
| + return;
|
| + }
|
| +
|
| + if (security_level_ ==
|
| + security_state::SecurityStateModel::HTTP_SHOW_WARNING) {
|
| + UMA_HISTOGRAM_ENUMERATION("PageInfo.Action.HttpWarning", action,
|
| + WEBSITE_SETTINGS_COUNT);
|
| + } else if (security_level_ == security_state::SecurityStateModel::DANGEROUS) {
|
| + UMA_HISTOGRAM_ENUMERATION("PageInfo.Action.HttpUrlDangerous", action,
|
| WEBSITE_SETTINGS_COUNT);
|
| }
|
| }
|
| @@ -412,6 +422,8 @@ void WebsiteSettings::Init(
|
| isChromeUINativeScheme = url.SchemeIs(chrome::kChromeUINativeScheme);
|
| #endif
|
|
|
| + security_level_ = security_info.security_level;
|
| +
|
| if (url.SchemeIs(url::kAboutScheme)) {
|
| // All about: URLs except about:blank are redirected.
|
| DCHECK_EQ(url::kAboutBlankURL, url.spec());
|
|
|