Index: chrome/browser/content_settings/tab_specific_content_settings.cc |
diff --git a/chrome/browser/content_settings/tab_specific_content_settings.cc b/chrome/browser/content_settings/tab_specific_content_settings.cc |
index d52e41d19b0c58e9e29c09dab70820ce11dffb55..118f63a34cec1890dcd650d18f91f3451b0e2a53 100644 |
--- a/chrome/browser/content_settings/tab_specific_content_settings.cc |
+++ b/chrome/browser/content_settings/tab_specific_content_settings.cc |
@@ -8,6 +8,7 @@ |
#include "base/command_line.h" |
#include "base/lazy_instance.h" |
+#include "base/metrics/histogram.h" |
#include "base/prefs/pref_service.h" |
#include "base/strings/utf_string_conversions.h" |
#include "chrome/browser/browsing_data/browsing_data_appcache_helper.h" |
@@ -102,6 +103,13 @@ TabSpecificContentSettings::~TabSpecificContentSettings() { |
SiteDataObserver, observer_list_, ContentSettingsDestroyed()); |
} |
+void TabSpecificContentSettings::RecordMixedScriptAction( |
+ MixedScriptAction action) { |
+ UMA_HISTOGRAM_ENUMERATION("ContentSettings.MixedScript", |
+ action, |
+ MIXED_SCRIPT_ACTION_COUNT); |
+} |
+ |
TabSpecificContentSettings* TabSpecificContentSettings::Get( |
int render_process_id, int render_view_id) { |
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
@@ -324,6 +332,9 @@ void TabSpecificContentSettings::OnContentBlocked(ContentSettingsType type) { |
chrome::NOTIFICATION_WEB_CONTENT_SETTINGS_CHANGED, |
content::Source<WebContents>(web_contents()), |
content::NotificationService::NoDetails()); |
+ |
+ if (type == CONTENT_SETTINGS_TYPE_MIXEDSCRIPT) |
+ RecordMixedScriptAction(MIXED_SCRIPT_ACTION_DISPLAYED_SHIELD); |
} |
} |