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

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

Issue 1849673002: Add metrics for user manually added exceptions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix patch failures Created 4 years, 8 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 04bc2a1086f2bc0ac94ba7b8dc45514c25d7d297..673b28d797e084c36a5d90a3068a777496850a91 100644
--- a/chrome/browser/ui/webui/options/content_settings_handler.cc
+++ b/chrome/browser/ui/webui/options/content_settings_handler.cc
@@ -16,6 +16,7 @@
#include "base/logging.h"
#include "base/macros.h"
#include "base/memory/ptr_util.h"
+#include "base/metrics/histogram_macros.h"
#include "base/stl_util.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/utf_string_conversions.h"
@@ -1532,6 +1533,11 @@ void ContentSettingsHandler::SetException(const base::ListValue* args) {
ContentSettingsPattern::FromString(pattern),
ContentSettingsPattern::Wildcard(), type, std::string(), setting_type);
WebSiteSettingsUmaUtil::LogPermissionChange(type, setting_type);
+
+ size_t num_values;
+ int histogram_value = ContentSettingTypeToHistogramValue(type, &num_values);
+ UMA_HISTOGRAM_ENUMERATION("ContentSettings.AddManualException",
+ histogram_value, num_values);
raymes 2016/04/12 23:22:39 Do you think this histogram will be useful?
lshang 2016/04/14 04:55:29 Done.
}
}

Powered by Google App Engine
This is Rietveld 408576698