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

Unified Diff: chrome/browser/ui/webui/options/content_settings_handler.cc

Issue 952463002: Add UMA to track permission changes from the content settings menu (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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/webui/options/content_settings_handler.cc
diff --git a/chrome/browser/ui/webui/options/content_settings_handler.cc b/chrome/browser/ui/webui/options/content_settings_handler.cc
index 5f9ff7c9f4bf888382e1a43d36c4dd577e0d1dec..e0c407e80fc18286c0fda3931df25d95190adc5c 100644
--- a/chrome/browser/ui/webui/options/content_settings_handler.cc
+++ b/chrome/browser/ui/webui/options/content_settings_handler.cc
@@ -11,6 +11,7 @@
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/command_line.h"
+#include "base/metrics/histogram.h"
#include "base/prefs/pref_service.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/utf_string_conversions.h"
@@ -1418,6 +1419,16 @@ void ContentSettingsHandler::RemoveException(const base::ListValue* args) {
RemoveMediaException(args);
else
RemoveExceptionFromHostContentSettingsMap(args, type);
+ ContentSettingsTypeHistogram histogram_value =
Finnur 2015/02/23 14:15:27 nit: Line-break above (looks as-is a bit like part
Miguel Garcia 2015/02/23 14:35:21 Done.
+ ContentSettingTypeToHistogramValue(type);
Finnur 2015/02/23 14:15:27 In the other place, you DCHECK if you get an inval
Miguel Garcia 2015/02/23 14:35:21 Done.
+
+ UMA_HISTOGRAM_ENUMERATION("WebsiteSettings.Menu.PermissionChanged",
+ histogram_value,
+ CONTENT_SETTINGS_HISTOGRAM_NUM_TYPES);
+
+ UMA_HISTOGRAM_ENUMERATION(
+ "WebsiteSettings.ContentSettings.PermissionChanged.Ask", histogram_value,
Finnur 2015/02/23 14:15:27 Same here: s/Ask/Reset/
Miguel Garcia 2015/02/23 14:35:21 Done.
+ CONTENT_SETTINGS_HISTOGRAM_NUM_TYPES);
}
void ContentSettingsHandler::SetException(const base::ListValue* args) {

Powered by Google App Engine
This is Rietveld 408576698