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

Unified Diff: chrome/browser/content_settings/permission_context_uma_util.h

Issue 371933002: Add UMA for the new generic permisison class (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rework the UMA based on mpearsons suggestion. Add extra UMA for ignored and dismissed requests Created 6 years, 5 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/permission_context_uma_util.h
diff --git a/chrome/browser/content_settings/permission_context_uma_util.h b/chrome/browser/content_settings/permission_context_uma_util.h
new file mode 100644
index 0000000000000000000000000000000000000000..62bbcb1a352d78337a20bb398c2c1acf261e5ac4
--- /dev/null
+++ b/chrome/browser/content_settings/permission_context_uma_util.h
@@ -0,0 +1,27 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_CONTENT_SETTINGS_PERMISSION_CONTEXT_UMA_UTIL_H_
+#define CHROME_BROWSER_CONTENT_SETTINGS_PERMISSION_CONTEXT_UMA_UTIL_H_
+
+#include "base/logging.h"
+#include "chrome/common/content_settings_types.h"
+
+// Provides a convenient way of logging UMA for permission related
+// operations.
+class PermissionContextUmaUtil {
+ public:
+ static void PermissionRequested(ContentSettingsType permission);
+ static void PermissionGranted(ContentSettingsType permission);
+ static void PermissionDenied(ContentSettingsType permission);
+ static void PermissionDismissed(ContentSettingsType permission);
+ static void PermissionIgnored(ContentSettingsType permission);
+
+ private:
+ PermissionContextUmaUtil() {} // only static methods allowed
Bernhard Bauer 2014/07/14 15:22:15 DISALLOW_IMPLICIT_CONSTRUCTORS that will do this a
Miguel Garcia 2014/07/14 16:57:50 Thanks for the tip!
+
+ DISALLOW_COPY_AND_ASSIGN(PermissionContextUmaUtil);
+};
+
+#endif // CHROME_BROWSER_CONTENT_SETTINGS_PERMISSION_CONTEXT_UMA_UTIL_H_

Powered by Google App Engine
This is Rietveld 408576698