OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_PERMISSIONS_PERMISSION_UMA_UTIL_H_ | 5 #ifndef CHROME_BROWSER_PERMISSIONS_PERMISSION_UMA_UTIL_H_ |
6 #define CHROME_BROWSER_PERMISSIONS_PERMISSION_UMA_UTIL_H_ | 6 #define CHROME_BROWSER_PERMISSIONS_PERMISSION_UMA_UTIL_H_ |
7 | 7 |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/macros.h" |
9 | 10 |
10 class GURL; | 11 class GURL; |
11 class Profile; | 12 class Profile; |
12 | 13 |
13 namespace content { | 14 namespace content { |
14 enum class PermissionType; | 15 enum class PermissionType; |
15 } // namespace content | 16 } // namespace content |
16 | 17 |
17 // Provides a convenient way of logging UMA for permission related operations. | 18 // Provides a convenient way of logging UMA for permission related operations. |
18 class PermissionUmaUtil { | 19 class PermissionUmaUtil { |
19 public: | 20 public: |
20 static void PermissionRequested(content::PermissionType permission, | 21 static void PermissionRequested(content::PermissionType permission, |
21 const GURL& requesting_origin, | 22 const GURL& requesting_origin, |
22 const GURL& embedding_origin, | 23 const GURL& embedding_origin, |
23 Profile* profile); | 24 Profile* profile); |
24 static void PermissionGranted(content::PermissionType permission, | 25 static void PermissionGranted(content::PermissionType permission, |
25 const GURL& requesting_origin); | 26 const GURL& requesting_origin); |
26 static void PermissionDenied(content::PermissionType permission, | 27 static void PermissionDenied(content::PermissionType permission, |
27 const GURL& requesting_origin); | 28 const GURL& requesting_origin); |
28 static void PermissionDismissed(content::PermissionType permission, | 29 static void PermissionDismissed(content::PermissionType permission, |
29 const GURL& requesting_origin); | 30 const GURL& requesting_origin); |
30 static void PermissionIgnored(content::PermissionType permission, | 31 static void PermissionIgnored(content::PermissionType permission, |
31 const GURL& requesting_origin); | 32 const GURL& requesting_origin); |
32 | 33 |
33 private: | 34 private: |
34 DISALLOW_IMPLICIT_CONSTRUCTORS(PermissionUmaUtil); | 35 DISALLOW_IMPLICIT_CONSTRUCTORS(PermissionUmaUtil); |
35 }; | 36 }; |
36 | 37 |
37 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_UMA_UTIL_H_ | 38 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_UMA_UTIL_H_ |
OLD | NEW |