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

Unified Diff: chrome/browser/content_settings/tab_specific_content_settings.cc

Issue 659573003: Log mixed script shield events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
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..2c6afb89b4011036aee0020ddc17b6352c8fedb8 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"
@@ -324,6 +325,12 @@ 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) {
+ UMA_HISTOGRAM_ENUMERATION("ContentSettings.MixedScript",
+ MIXEDSCRIPT_DISPLAYED_SHIELD,
+ MIXEDSCRIPT_CONTENT_NUM_EVENTS);
Ilya Sherman 2014/10/16 03:24:51 Please define a wrapper function that emits to thi
+ }
}
}

Powered by Google App Engine
This is Rietveld 408576698