Chromium Code Reviews| Index: components/content_settings/core/browser/host_content_settings_map.cc |
| diff --git a/components/content_settings/core/browser/host_content_settings_map.cc b/components/content_settings/core/browser/host_content_settings_map.cc |
| index 4779c643d4a2742508921be9e196896b29994d82..dc8df2aefc1bd0c87e375075982697aac386a29a 100644 |
| --- a/components/content_settings/core/browser/host_content_settings_map.cc |
| +++ b/components/content_settings/core/browser/host_content_settings_map.cc |
| @@ -623,10 +623,28 @@ void HostContentSettingsMap::RecordExceptionMetrics() { |
| continue; |
| } |
| - UMA_HISTOGRAM_ENUMERATION("ContentSettings.ExceptionScheme", |
| - setting_entry.primary_pattern.GetScheme(), |
| + ContentSettingsPattern::SchemeType scheme = |
| + setting_entry.primary_pattern.GetScheme(); |
| + UMA_HISTOGRAM_ENUMERATION("ContentSettings.ExceptionScheme", scheme, |
| ContentSettingsPattern::SCHEME_MAX); |
| + if (scheme == ContentSettingsPattern::SCHEME_FILE) { |
| + UMA_HISTOGRAM_BOOLEAN("ContentSettings.ExceptionSchemeFile.HasPath", |
| + setting_entry.primary_pattern.HasPath()); |
| + size_t num_values; |
| + int histogram_value = |
| + ContentSettingTypeToHistogramValue(content_type, &num_values); |
| + if (setting_entry.primary_pattern.HasPath()) { |
| + UMA_HISTOGRAM_ENUMERATION( |
| + "ContentSettings.ExceptionSchemeFile.TypeWithPath", |
|
Ilya Sherman
2016/09/27 00:54:33
Optional nit: I'd suggest more dots in the name --
alexmos
2016/09/27 01:11:22
Done.
Ilya Sherman
2016/09/27 01:15:25
Hmm, it looks like you updated the name in histogr
alexmos
2016/09/27 01:27:46
My bad - somehow the file ended up not being saved
|
| + histogram_value, num_values); |
| + } else { |
| + UMA_HISTOGRAM_ENUMERATION( |
| + "ContentSettings.ExceptionSchemeFile.TypeWithoutPath", |
| + histogram_value, num_values); |
| + } |
| + } |
| + |
| if (setting_entry.source == "preference") |
| ++num_exceptions; |
| } |