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

Unified Diff: chrome/browser/ui/content_settings/content_setting_bubble_model.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/ui/content_settings/content_setting_bubble_model.cc
diff --git a/chrome/browser/ui/content_settings/content_setting_bubble_model.cc b/chrome/browser/ui/content_settings/content_setting_bubble_model.cc
index 5ae6f1b53d2ab804d02f695b7f6e126b102c66e7..93126f4a2f97f0be7cd3ced40e1ef1ed263e3b5a 100644
--- a/chrome/browser/ui/content_settings/content_setting_bubble_model.cc
+++ b/chrome/browser/ui/content_settings/content_setting_bubble_model.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/ui/content_settings/content_setting_bubble_model.h"
#include "base/command_line.h"
+#include "base/metrics/histogram.h"
#include "base/prefs/pref_service.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/chrome_notification_types.h"
@@ -964,11 +965,16 @@ ContentSettingMixedScriptBubbleModel::ContentSettingMixedScriptBubbleModel(
: ContentSettingTitleLinkAndCustomModel(
delegate, web_contents, profile, content_type) {
DCHECK_EQ(content_type, CONTENT_SETTINGS_TYPE_MIXEDSCRIPT);
+ UMA_HISTOGRAM_ENUMERATION("ContentSettings.MixedScript",
+ TabSpecificContentSettings::MIXEDSCRIPT_DISPLAYED_BUBBLE,
+ TabSpecificContentSettings::MIXEDSCRIPT_CONTENT_NUM_EVENTS);
set_custom_link_enabled(true);
}
void ContentSettingMixedScriptBubbleModel::OnCustomLinkClicked() {
- content::RecordAction(UserMetricsAction("MixedScript_LoadAnyway_Bubble"));
+ UMA_HISTOGRAM_ENUMERATION("ContentSettings.MixedScript",
+ TabSpecificContentSettings::MIXEDSCRIPT_CLICKED_ALLOW,
+ TabSpecificContentSettings::MIXEDSCRIPT_CONTENT_NUM_EVENTS);
DCHECK(web_contents());
web_contents()->SendToAllFrames(
new ChromeViewMsg_SetAllowRunningInsecureContent(MSG_ROUTING_NONE, true));

Powered by Google App Engine
This is Rietveld 408576698