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

Unified Diff: chrome/browser/ui/webui/options/content_settings_handler.cc

Issue 2296073002: [HBD] Update Old Options Strings for HBD (Closed)
Patch Set: address feedback 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
Index: chrome/browser/ui/webui/options/content_settings_handler.cc
diff --git a/chrome/browser/ui/webui/options/content_settings_handler.cc b/chrome/browser/ui/webui/options/content_settings_handler.cc
index 071a24e705a6fa114f303c38f559900c879306e5..e975b253b71326094a3397870190310e915e043c 100644
--- a/chrome/browser/ui/webui/options/content_settings_handler.cc
+++ b/chrome/browser/ui/webui/options/content_settings_handler.cc
@@ -39,6 +39,7 @@
#include "chrome/browser/ui/webui/site_settings_helper.h"
#include "chrome/browser/usb/usb_chooser_context.h"
#include "chrome/browser/usb/usb_chooser_context_factory.h"
+#include "chrome/common/chrome_features.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/extensions/manifest_handlers/app_launch_info.h"
#include "chrome/common/features.h"
@@ -372,7 +373,6 @@ void ContentSettingsHandler::GetLocalizedValues(
{"allowException", IDS_EXCEPTIONS_ALLOW_BUTTON},
{"blockException", IDS_EXCEPTIONS_BLOCK_BUTTON},
{"sessionException", IDS_EXCEPTIONS_SESSION_ONLY_BUTTON},
- {"detectException", IDS_EXCEPTIONS_DETECT_IMPORTANT_CONTENT_BUTTON},
{"askException", IDS_EXCEPTIONS_ASK_BUTTON},
{"otrExceptionsExplanation", IDS_EXCEPTIONS_OTR_LABEL},
{"addNewExceptionInstructions", IDS_EXCEPTIONS_ADD_NEW_INSTRUCTIONS},
@@ -408,12 +408,10 @@ void ContentSettingsHandler::GetLocalizedValues(
{"javascriptAllow", IDS_JS_ALLOW_RADIO},
{"javascriptBlock", IDS_JS_DONOTALLOW_RADIO},
// Plugins filter.
- {"pluginsTabLabel", IDS_PLUGIN_TAB_LABEL},
- {"pluginsHeader", IDS_PLUGIN_HEADER},
- {"pluginsAllow", IDS_PLUGIN_ALLOW_RADIO},
- {"pluginsBlock", IDS_PLUGIN_BLOCK_RADIO},
- {"pluginsDetectImportantContent", IDS_PLUGIN_DETECT_RECOMMENDED_RADIO},
- {"manageIndividualPlugins", IDS_PLUGIN_MANAGE_INDIVIDUAL},
+ {"pluginsTabLabel", IDS_FLASH_TAB_LABEL},
+ {"pluginsHeader", IDS_FLASH_HEADER},
+ {"pluginsAllow", IDS_FLASH_ALLOW_RADIO},
+ {"pluginsBlock", IDS_FLASH_BLOCK_RADIO},
// Pop-ups filter.
{"popupsTabLabel", IDS_POPUP_TAB_LABEL},
{"popupsHeader", IDS_POPUP_HEADER},
@@ -510,6 +508,23 @@ void ContentSettingsHandler::GetLocalizedValues(
RegisterStrings(localized_strings, resources, arraysize(resources));
+ // TODO(tommycli): When the HTML5 By Default feature flag is on, we want to
+ // display strings that begin with "Ask...", even though the setting remains
+ // DETECT. Once this feature is finalized, then we migrate the setting to ASK.
+ if (base::FeatureList::IsEnabled(features::kPreferHtmlOverPlugins)) {
+ static OptionsStringResource flash_strings[] = {
+ {"pluginsDetectImportantContent", IDS_FLASH_ASK_RECOMMENDED_RADIO},
Dan Beam 2016/09/20 22:53:20 make this ternary if possible or otherwise de-dupe
tommycli 2016/09/20 23:39:04 Done.
+ {"detectException", IDS_EXCEPTIONS_ASK_BUTTON},
+ };
+ RegisterStrings(localized_strings, flash_strings, arraysize(flash_strings));
+ } else {
+ static OptionsStringResource flash_strings[] = {
+ {"pluginsDetectImportantContent", IDS_FLASH_DETECT_RECOMMENDED_RADIO},
+ {"detectException", IDS_EXCEPTIONS_DETECT_IMPORTANT_CONTENT_BUTTON},
+ };
+ RegisterStrings(localized_strings, flash_strings, arraysize(flash_strings));
+ }
+
PrefService* prefs = Profile::FromWebUI(web_ui())->GetPrefs();
const base::Value* default_pref = prefs->GetDefaultPrefValue(
content_settings::WebsiteSettingsRegistry::GetInstance()
@@ -533,7 +548,7 @@ void ContentSettingsHandler::GetLocalizedValues(
RegisterTitle(localized_strings, "javascript",
IDS_JAVASCRIPT_TAB_LABEL);
RegisterTitle(localized_strings, "plugins",
- IDS_PLUGIN_TAB_LABEL);
+ IDS_FLASH_TAB_LABEL);
RegisterTitle(localized_strings, "popups",
IDS_POPUP_TAB_LABEL);
RegisterTitle(localized_strings, "location",

Powered by Google App Engine
This is Rietveld 408576698