Chromium Code Reviews| OLD | NEW |
|---|---|
| 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_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_PERMISSIONS_PERMISSION_MANAGER_H_ |
| 6 #define CHROME_BROWSER_PERMISSIONS_PERMISSION_MANAGER_H_ | 6 #define CHROME_BROWSER_PERMISSIONS_PERMISSION_MANAGER_H_ |
| 7 | 7 |
| 8 #include <unordered_map> | 8 #include <unordered_map> |
| 9 | 9 |
| 10 #include "base/callback_forward.h" | 10 #include "base/callback_forward.h" |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 21 class Profile; | 21 class Profile; |
| 22 | 22 |
| 23 namespace content { | 23 namespace content { |
| 24 enum class PermissionType; | 24 enum class PermissionType; |
| 25 }; // namespace content | 25 }; // namespace content |
| 26 | 26 |
| 27 class PermissionManager : public KeyedService, | 27 class PermissionManager : public KeyedService, |
| 28 public content::PermissionManager, | 28 public content::PermissionManager, |
| 29 public content_settings::Observer { | 29 public content_settings::Observer { |
| 30 public: | 30 public: |
| 31 // A field trial used to enable the global permissions kill switch. | |
| 32 // This is public so permissions that don't yet inherit from | |
| 33 // PermissionContextBase can use it. | |
| 34 static const char kPermissionsKillSwitchFieldStudy[]; | |
| 35 | |
| 36 // The field trial param to enable the global permissions kill switch. | |
| 37 // This is public so permissions that don't yet inherit from | |
| 38 // PermissionContextBase can use it. | |
| 39 static const char kPermissionsKillSwitchBlockedValue[]; | |
|
raymes
2017/01/09 05:47:27
Hmm, are these meant to be in this CL?
benwells
2017/01/09 21:02:22
Ummm ... no ....
I have no idea how that got here
| |
| 40 | |
| 31 static PermissionManager* Get(Profile* profile); | 41 static PermissionManager* Get(Profile* profile); |
| 32 | 42 |
| 33 explicit PermissionManager(Profile* profile); | 43 explicit PermissionManager(Profile* profile); |
| 34 ~PermissionManager() override; | 44 ~PermissionManager() override; |
| 35 | 45 |
| 36 // content::PermissionManager implementation. | 46 // content::PermissionManager implementation. |
| 37 int RequestPermission( | 47 int RequestPermission( |
| 38 content::PermissionType permission, | 48 content::PermissionType permission, |
| 39 content::RenderFrameHost* render_frame_host, | 49 content::RenderFrameHost* render_frame_host, |
| 40 const GURL& requesting_origin, | 50 const GURL& requesting_origin, |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 113 std::unique_ptr<PermissionContextBase>, | 123 std::unique_ptr<PermissionContextBase>, |
| 114 PermissionTypeHash> | 124 PermissionTypeHash> |
| 115 permission_contexts_; | 125 permission_contexts_; |
| 116 | 126 |
| 117 base::WeakPtrFactory<PermissionManager> weak_ptr_factory_; | 127 base::WeakPtrFactory<PermissionManager> weak_ptr_factory_; |
| 118 | 128 |
| 119 DISALLOW_COPY_AND_ASSIGN(PermissionManager); | 129 DISALLOW_COPY_AND_ASSIGN(PermissionManager); |
| 120 }; | 130 }; |
| 121 | 131 |
| 122 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_MANAGER_H_ | 132 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_MANAGER_H_ |
| OLD | NEW |