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

Unified Diff: chrome/browser/permissions/permission_manager.cc

Issue 2339093002: [HBD] Add Plugins permission type and PermissionContext (Closed)
Patch Set: [HBD] Add Plugins permission type and PermissionContext Created 4 years, 3 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
« no previous file with comments | « chrome/browser/BUILD.gn ('k') | chrome/browser/permissions/permission_request.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/permissions/permission_manager.cc
diff --git a/chrome/browser/permissions/permission_manager.cc b/chrome/browser/permissions/permission_manager.cc
index fae00133077224ca301fea205e6f2d4b7abd1961..941b3e6d4982b2567a27e95949286d856c3ddd77 100644
--- a/chrome/browser/permissions/permission_manager.cc
+++ b/chrome/browser/permissions/permission_manager.cc
@@ -6,6 +6,8 @@
#include <stddef.h>
+#include <memory>
+
#include "base/callback.h"
#include "base/memory/ptr_util.h"
#include "build/build_config.h"
@@ -28,6 +30,10 @@
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/web_contents.h"
+#if defined(ENABLE_PLUGINS)
+#include "chrome/browser/plugins/plugins_permission_context.h"
+#endif
+
#if defined(OS_ANDROID) || defined(OS_CHROMEOS)
#include "chrome/browser/media/protected_media_identifier_permission_context.h"
#endif
@@ -99,6 +105,8 @@ ContentSettingsType PermissionTypeToContentSetting(PermissionType permission) {
return CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA;
case PermissionType::BACKGROUND_SYNC:
return CONTENT_SETTINGS_TYPE_BACKGROUND_SYNC;
+ case PermissionType::PLUGINS:
+ return CONTENT_SETTINGS_TYPE_PLUGINS;
case PermissionType::NUM:
// This will hit the NOTREACHED below.
break;
@@ -248,6 +256,10 @@ PermissionManager::PermissionManager(Profile* profile)
CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA);
permission_contexts_[PermissionType::BACKGROUND_SYNC] =
base::MakeUnique<BackgroundSyncPermissionContext>(profile);
+#if defined(ENABLE_PLUGINS)
+ permission_contexts_[PermissionType::PLUGINS] =
+ base::MakeUnique<PluginsPermissionContext>(profile);
+#endif
}
PermissionManager::~PermissionManager() {
« no previous file with comments | « chrome/browser/BUILD.gn ('k') | chrome/browser/permissions/permission_request.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698