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

Unified Diff: chrome/browser/ui/website_settings/permission_menu_model.cc

Issue 2512563003: Convert enable_plugins to a buildflag header. (Closed)
Patch Set: Merge Created 4 years, 1 month 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/ui/website_settings/permission_menu_model.cc
diff --git a/chrome/browser/ui/website_settings/permission_menu_model.cc b/chrome/browser/ui/website_settings/permission_menu_model.cc
index fbd8adf1c23953d6fce951b70d3138b3366dd8cd..80665ac7b554f02092ed987fda26cf6c707264b0 100644
--- a/chrome/browser/ui/website_settings/permission_menu_model.cc
+++ b/chrome/browser/ui/website_settings/permission_menu_model.cc
@@ -10,6 +10,7 @@
#include "chrome/common/chrome_features.h"
#include "chrome/grit/generated_resources.h"
#include "content/public/common/origin_util.h"
+#include "ppapi/features/features.h"
#include "ui/base/l10n/l10n_util.h"
PermissionMenuModel::PermissionMenuModel(
@@ -27,11 +28,11 @@ PermissionMenuModel::PermissionMenuModel(
ContentSetting effective_default_setting = permission_.default_setting;
-#if defined(ENABLE_PLUGINS)
+#if BUILDFLAG(ENABLE_PLUGINS)
effective_default_setting = PluginsFieldTrial::EffectiveContentSetting(
host_content_settings_map_, permission_.type,
permission_.default_setting);
-#endif // defined(ENABLE_PLUGINS)
+#endif // BUILDFLAG(ENABLE_PLUGINS)
switch (effective_default_setting) {
case CONTENT_SETTING_ALLOW:
@@ -114,10 +115,10 @@ PermissionMenuModel::~PermissionMenuModel() {}
bool PermissionMenuModel::IsCommandIdChecked(int command_id) const {
ContentSetting setting = permission_.setting;
-#if defined(ENABLE_PLUGINS)
+#if BUILDFLAG(ENABLE_PLUGINS)
setting = PluginsFieldTrial::EffectiveContentSetting(
host_content_settings_map_, permission_.type, permission_.setting);
-#endif // defined(ENABLE_PLUGINS)
+#endif // BUILDFLAG(ENABLE_PLUGINS)
return setting == command_id;
}

Powered by Google App Engine
This is Rietveld 408576698