blob: f7f886fae7a0e3a68e1b828f0e225f3041787da6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
// 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_PERMISSIONS_PERMISSION_UMA_UTIL_H_
#define CHROME_BROWSER_PERMISSIONS_PERMISSION_UMA_UTIL_H_
#include "base/logging.h"
class GURL;
class Profile;
namespace content {
enum class PermissionType;
} // namespace content
// Provides a convenient way of logging UMA for permission related operations.
class PermissionUmaUtil {
public:
static void PermissionRequested(content::PermissionType permission,
const GURL& requesting_origin,
const GURL& embedding_origin,
Profile* profile);
static void PermissionGranted(content::PermissionType permission,
const GURL& requesting_origin);
static void PermissionDenied(content::PermissionType permission,
const GURL& requesting_origin);
static void PermissionDismissed(content::PermissionType permission,
const GURL& requesting_origin);
static void PermissionIgnored(content::PermissionType permission,
const GURL& requesting_origin);
private:
DISALLOW_IMPLICIT_CONSTRUCTORS(PermissionUmaUtil);
};
#endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_UMA_UTIL_H_
|