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

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

Issue 2291323003: [HBD] Update Plugins type in Website Settings Permissions UI (Closed)
Patch Set: add comments 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/app/generated_resources.grd ('k') | chrome/browser/ui/website_settings/website_settings_ui.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 e644f4982ac0f637d08f7258c28ec9401d092a62..efaa99c2dff8af59ff9e3104be7a0af5e37c23eb 100644
--- a/chrome/browser/ui/website_settings/permission_menu_model.cc
+++ b/chrome/browser/ui/website_settings/permission_menu_model.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/ui/website_settings/permission_menu_model.h"
#include "chrome/browser/plugins/plugins_field_trial.h"
+#include "chrome/common/chrome_features.h"
#include "chrome/grit/generated_resources.h"
#include "content/public/common/origin_util.h"
#include "ui/base/l10n/l10n_util.h"
@@ -38,8 +39,13 @@ PermissionMenuModel::PermissionMenuModel(
l10n_util::GetStringUTF16(IDS_WEBSITE_SETTINGS_MENU_ITEM_DEFAULT_ASK);
break;
case CONTENT_SETTING_DETECT_IMPORTANT_CONTENT:
+ // TODO(tommycli): We display the ASK string for DETECT because with
+ // HTML5 by Default, Chrome will ask before running Flash on most sites.
+ // Once the feature flag is gone, migrate the actual setting to ASK.
label = l10n_util::GetStringUTF16(
- IDS_WEBSITE_SETTINGS_MENU_ITEM_DEFAULT_DETECT_IMPORTANT_CONTENT);
+ base::FeatureList::IsEnabled(features::kPreferHtmlOverPlugins)
+ ? IDS_WEBSITE_SETTINGS_MENU_ITEM_DEFAULT_ASK
+ : IDS_WEBSITE_SETTINGS_MENU_ITEM_DEFAULT_DETECT_IMPORTANT_CONTENT);
break;
case CONTENT_SETTING_NUM_SETTINGS:
NOTREACHED();
@@ -73,7 +79,11 @@ PermissionMenuModel::PermissionMenuModel(
AddCheckItem(CONTENT_SETTING_ALLOW, label);
}
- if (permission_.type == CONTENT_SETTINGS_TYPE_PLUGINS) {
+ // TODO(tommycli): With the HTML5 by Default feature, Flash is treated the
+ // same as any other permission with ASK, i.e. there is no ASK exception.
+ // Once the feature flag is gone, remove this block of code entirely.
+ if (permission_.type == CONTENT_SETTINGS_TYPE_PLUGINS &&
+ !base::FeatureList::IsEnabled(features::kPreferHtmlOverPlugins)) {
label = l10n_util::GetStringUTF16(
IDS_WEBSITE_SETTINGS_MENU_ITEM_DETECT_IMPORTANT_CONTENT);
AddCheckItem(CONTENT_SETTING_DETECT_IMPORTANT_CONTENT, label);
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/ui/website_settings/website_settings_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698