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

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

Issue 371933002: Add UMA for the new generic permisison class (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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_base.h
diff --git a/chrome/browser/content_settings/permission_context_base.h b/chrome/browser/content_settings/permission_context_base.h
index 76bbc91137b615688b3c4b4b1e2e4d802138c25d..871ea9300424270972f3d7e706dcd387faec69c7 100644
--- a/chrome/browser/content_settings/permission_context_base.h
+++ b/chrome/browser/content_settings/permission_context_base.h
@@ -22,6 +22,17 @@ namespace content {
class WebContents;
}
+// Enum for UMA purposes, make sure you update histograms.xml if you
+// add new pemissions.
+enum PermissionType {
+ PERMISSION_UNKNOWN,
+ PERMISSION_MIDI_SYSEX,
+ PERMISSION_PUSH_MESSAGING,
+
+ // Always keep this at the end.
+ PERMISSION_NUM,
+};
+
typedef base::Callback<void(bool)> BrowserPermissionCallback;
// This base class contains common operations for granting permissions.
@@ -79,6 +90,7 @@ class PermissionContextBase : public KeyedService {
const GURL& requesting_origin,
const GURL& embedder_origin,
const BrowserPermissionCallback& callback,
+ bool persist,
bool allowed);
void NotifyPermissionSet(const PermissionRequestID& id,
@@ -98,6 +110,7 @@ class PermissionContextBase : public KeyedService {
PermissionQueueController* GetQueueController();
private:
+ static PermissionType SettingToPermission(ContentSettingsType permission);
Bernhard Bauer 2014/07/08 12:54:52 If this method is static and private, do you need
Miguel Garcia 2014/07/08 14:14:20 Sure, it does not need to be a method, it cans jus
void UpdateContentSetting(
const GURL& requesting_origin,
const GURL& embedder_origin,

Powered by Google App Engine
This is Rietveld 408576698