Chromium Code Reviews| 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..ccb95a27806d3c49049aaef5cb72ecbf5b660cd2 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}, |
| @@ -412,7 +412,6 @@ void ContentSettingsHandler::GetLocalizedValues( |
| {"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}, |
| // Pop-ups filter. |
| {"popupsTabLabel", IDS_POPUP_TAB_LABEL}, |
| @@ -510,6 +509,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. |
|
Dan Beam
2016/09/01 06:15:15
wat
tommycli
2016/09/01 17:59:33
Acknowledged.
|
| + if (base::FeatureList::IsEnabled(features::kPreferHtmlOverPlugins)) { |
| + static OptionsStringResource flash_strings[] = { |
| + {"pluginsDetectImportantContent", IDS_PLUGIN_ASK_RECOMMENDED_RADIO}, |
| + {"detectException", IDS_EXCEPTIONS_ASK_BUTTON}, |
| + }; |
| + RegisterStrings(localized_strings, flash_strings, arraysize(flash_strings)); |
| + } else { |
| + static OptionsStringResource flash_strings[] = { |
| + {"pluginsDetectImportantContent", IDS_PLUGIN_DETECT_RECOMMENDED_RADIO}, |
| + {"detectException", IDS_EXCEPTIONS_DETECT_IMPORTANT_CONTENT_BUTTON}, |
| + }; |
| + RegisterStrings(localized_strings, flash_strings, arraysize(flash_strings)); |
| + } |
|
Dan Beam
2016/09/01 06:15:15
please tell me there's any other way to do this...
tommycli
2016/09/01 17:59:33
This is unfortunate. The story is:
ASK was origin
tommycli
2016/09/01 18:04:25
I could just also change IDS_PLUGIN_ASK_RECOMMEND_
raymes
2016/09/14 01:48:05
I agree it's confusing but I can't really think of
tommycli
2016/09/14 20:55:16
Okay sounds good, I'll add bauerb. I don't want to
|
| + |
| PrefService* prefs = Profile::FromWebUI(web_ui())->GetPrefs(); |
| const base::Value* default_pref = prefs->GetDefaultPrefValue( |
| content_settings::WebsiteSettingsRegistry::GetInstance() |