blob: 05130bacf2b397ac5a05d41fce0eff8fef34e9af (
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
|
// 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_CONTEXT_UMA_UTIL_H_
#define CHROME_BROWSER_PERMISSIONS_PERMISSION_CONTEXT_UMA_UTIL_H_
#include "base/logging.h"
#include "components/content_settings/core/common/content_settings_types.h"
class GURL;
class Profile;
// Provides a convenient way of logging UMA for permission related
// operations.
class PermissionContextUmaUtil {
public:
static void PermissionRequested(ContentSettingsType permission,
const GURL& requesting_origin,
const GURL& embedding_origin,
Profile* profile);
static void PermissionGranted(ContentSettingsType permission,
const GURL& requesting_origin);
static void PermissionDenied(ContentSettingsType permission,
const GURL& requesting_origin);
static void PermissionDismissed(ContentSettingsType permission,
const GURL& requesting_origin);
static void PermissionIgnored(ContentSettingsType permission,
const GURL& requesting_origin);
private:
DISALLOW_IMPLICIT_CONSTRUCTORS(PermissionContextUmaUtil);
};
#endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_CONTEXT_UMA_UTIL_H_
|