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

Side by Side Diff: chrome/browser/permissions/permission_util.h

Issue 2046293002: Implement DelegationTracker for tracking delegated permissions to RenderFrameHosts (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@permission-delegation-2-blink
Patch Set: Implement DelegationTracker for tracking delegated permissions to RenderFrameHosts Created 4 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_UTIL_H_ 5 #ifndef CHROME_BROWSER_PERMISSIONS_PERMISSION_UTIL_H_
6 #define CHROME_BROWSER_PERMISSIONS_PERMISSION_UTIL_H_ 6 #define CHROME_BROWSER_PERMISSIONS_PERMISSION_UTIL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "components/content_settings/core/common/content_settings.h" 11 #include "components/content_settings/core/common/content_settings.h"
12 #include "components/content_settings/core/common/content_settings_types.h" 12 #include "components/content_settings/core/common/content_settings_types.h"
13 13
14 class GURL; 14 class GURL;
15 class Profile; 15 class Profile;
16 16
17 namespace content { 17 namespace content {
18 enum class PermissionType; 18 enum class PermissionType;
19 } // namespace content 19 } // namespace content
20 20
21 struct PermissionTypeHash {
22 std::size_t operator()(const content::PermissionType& type) const;
23 };
24
21 // A utility class for permissions. 25 // A utility class for permissions.
22 class PermissionUtil { 26 class PermissionUtil {
23 public: 27 public:
24 // Returns the permission string for the given PermissionType. 28 // Returns the permission string for the given PermissionType.
25 static std::string GetPermissionString(content::PermissionType permission); 29 static std::string GetPermissionString(content::PermissionType permission);
26 30
27 // Limited conversion of ContentSettingsType to PermissionType. Intended for 31 // Limited conversion of ContentSettingsType to PermissionType. Intended for
28 // recording Permission UMA metrics from areas of the codebase which have not 32 // recording Permission UMA metrics from areas of the codebase which have not
29 // yet been converted to PermissionType. Returns true if the conversion was 33 // yet been converted to PermissionType. Returns true if the conversion was
30 // performed. 34 // performed.
(...skipping 17 matching lines...) Expand all
48 const GURL& secondary_url, 52 const GURL& secondary_url,
49 ContentSettingsType content_type, 53 ContentSettingsType content_type,
50 std::string resource_identifier, 54 std::string resource_identifier,
51 ContentSetting setting); 55 ContentSetting setting);
52 56
53 private: 57 private:
54 DISALLOW_IMPLICIT_CONSTRUCTORS(PermissionUtil); 58 DISALLOW_IMPLICIT_CONSTRUCTORS(PermissionUtil);
55 }; 59 };
56 60
57 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_UTIL_H_ 61 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_UTIL_H_
OLDNEW
« no previous file with comments | « chrome/browser/permissions/permission_manager.cc ('k') | chrome/browser/permissions/permission_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698