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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_PERMISSIONS_PERMISSION_CONTEXT_UMA_UTIL_H_
6 #define CHROME_BROWSER_PERMISSIONS_PERMISSION_CONTEXT_UMA_UTIL_H_
8 #include "base/logging.h"
9 #include "components/content_settings/core/common/content_settings_types.h"
14 // Provides a convenient way of logging UMA for permission related
16 class PermissionContextUmaUtil
{
18 static void PermissionRequested(ContentSettingsType permission
,
19 const GURL
& requesting_origin
,
20 const GURL
& embedding_origin
,
22 static void PermissionGranted(ContentSettingsType permission
,
23 const GURL
& requesting_origin
);
24 static void PermissionDenied(ContentSettingsType permission
,
25 const GURL
& requesting_origin
);
26 static void PermissionDismissed(ContentSettingsType permission
,
27 const GURL
& requesting_origin
);
28 static void PermissionIgnored(ContentSettingsType permission
,
29 const GURL
& requesting_origin
);
32 DISALLOW_IMPLICIT_CONSTRUCTORS(PermissionContextUmaUtil
);
35 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_CONTEXT_UMA_UTIL_H_