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

Unified Diff: chrome/browser/devtools/devtools_ui_bindings.cc

Issue 1056073003: DevTools: introduce RecordEnumeratedHistogram method. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: register binding Created 5 years, 9 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
« no previous file with comments | « chrome/browser/devtools/devtools_ui_bindings.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/devtools/devtools_ui_bindings.cc
diff --git a/chrome/browser/devtools/devtools_ui_bindings.cc b/chrome/browser/devtools/devtools_ui_bindings.cc
index 03c3c97ae391af45b3c3c767c4f90f82e9308181..78b82107432d19deb8dbb0a0b07d1bd24ea20ebf 100644
--- a/chrome/browser/devtools/devtools_ui_bindings.cc
+++ b/chrome/browser/devtools/devtools_ui_bindings.cc
@@ -749,6 +749,17 @@ void DevToolsUIBindings::RecordActionUMA(const std::string& name, int action) {
UMA_HISTOGRAM_ENUMERATION(name, action, kDevToolsPanelShownBoundary);
}
+void DevToolsUIBindings::RecordUMA(const std::string& name,
+ int action,
+ int bucket_size) {
+ CHECK(0 < bucket_size && bucket_size < 100);
Tom Sepez 2015/04/03 17:46:51 CHECK-ing in the browser is bad when the renderer
lushnikov 2015/04/06 10:10:39 Done.
+ CHECK(0 <= action && action < bucket_size);
+
+ if (name == kDevToolsActionTakenHistogram ||
+ name == kDevToolsPanelShownHistogram)
+ UMA_HISTOGRAM_ENUMERATION(name, action, bucket_size);
+}
+
void DevToolsUIBindings::SendJsonRequest(const DispatchCallback& callback,
const std::string& browser_id,
const std::string& url) {
« no previous file with comments | « chrome/browser/devtools/devtools_ui_bindings.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698