Commit ca3d26dd authored by tommycli's avatar tommycli Committed by Commit bot

[HBD] Update Old Options Strings for HBD

Updates Plugins => Flash in Options Content Settings.

Also updates the radio button text as:

HBD On
  Allow sites to run Flash
  Ask first before allowing sites to run Flash (recommended)
  Block sites from running Flash

HBD Off
  Allow sites to run Flash
  Detect and run only important Flash content (recommended)
  Block sites from running Flash

UI Approved. See bug.

BUG=622922
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation

Review-Url: https://codereview.chromium.org/2296073002
Cr-Commit-Position: refs/heads/master@{#419945}
parent a4497121
......@@ -8135,23 +8135,23 @@ I don't think this site should be blocked!
{NUM_POPUPS,plural,=1{A pop-up is blocked} other{# pop-ups are blocked}}
</message>
</if>
<message name="IDS_PLUGIN_TAB_LABEL" desc="Label for Plugins tab on Content Settings dialog">
Plugins
<message name="IDS_FLASH_TAB_LABEL" desc="Label for Flash tab on Content Settings dialog">
Flash
</message>
<message name="IDS_PLUGIN_HEADER" desc="Header for plugin exception management page on Content Settings dialog">
Plugin exceptions
<message name="IDS_FLASH_HEADER" desc="Header for plugin exception management page on Content Settings dialog">
Flash exceptions
</message>
<message name="IDS_PLUGIN_ALLOW_RADIO" desc="A radio button in the Content Settings dialog for allowing plugins use on any site.">
Run all plugin content
<message name="IDS_FLASH_ALLOW_RADIO" desc="A radio button in the Content Settings dialog for allowing plugins use on any site.">
Allow sites to run Flash
</message>
<message name="IDS_PLUGIN_DETECT_RECOMMENDED_RADIO" desc="A radio button in the Content Settings dialog for detecting and running important plugin content only. This is the behavior Chrome recommends.">
Detect and run important plugin content (recommended)
<message name="IDS_FLASH_DETECT_RECOMMENDED_RADIO" desc="A radio button in the Content Settings dialog for detecting and running important plugin content only. This is the behavior Chrome recommends.">
Detect and run important Flash content (recommended)
</message>
<message name="IDS_PLUGIN_BLOCK_RADIO" desc="A radio button in the Content Settings dialog for gating plugins on a context menu activation.">
Let me choose when to run plugin content
<message name="IDS_FLASH_ASK_RECOMMENDED_RADIO" desc="A radio button in the Content Settings dialog for asking first before running Flash. This is the behavior Chrome recommends.">
Ask first before allowing sites to run Flash (recommended)
</message>
<message name="IDS_PLUGIN_MANAGE_INDIVIDUAL" desc="Link to manage individual plugins">
Manage individual plugins...
<message name="IDS_FLASH_BLOCK_RADIO" desc="A radio button in the Content Settings dialog for gating plugins on a context menu activation.">
Block sites from running Flash
</message>
<message name="IDS_JAVASCRIPT_TAB_LABEL" desc="Label for JavaScript tab on Content Settings dialog">
JavaScript
......
......@@ -66,12 +66,6 @@ select.exception-setting {
margin-top: 4px;
}
#disable-plugins-container {
/* Same as .checkbox and .radio padding. Using padding instead of margin
* to ensure minimum height for tap target. */
padding: 7px 0;
}
#group-indicator {
margin-left: 5px;
}
......
......@@ -206,10 +206,6 @@
<button class="exceptions-list-button" contentType="plugins"
i18n-content="manageExceptions"></button>
</div>
<div id="disable-plugins-container">
<a href="chrome://plugins" i18n-content="manageIndividualPlugins"
target="_blank"></a>
</div>
</div>
</section>
<!-- Pop-ups filter -->
......
......@@ -40,6 +40,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"
......@@ -373,7 +374,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},
......@@ -409,12 +409,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},
......@@ -511,6 +509,20 @@ 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.
bool is_hbd = base::FeatureList::IsEnabled(features::kPreferHtmlOverPlugins);
static OptionsStringResource flash_strings[] = {
{"pluginsDetectImportantContent",
is_hbd ? IDS_FLASH_ASK_RECOMMENDED_RADIO
: IDS_FLASH_DETECT_RECOMMENDED_RADIO},
{"detectException",
is_hbd ? IDS_EXCEPTIONS_ASK_BUTTON
: 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,8 +545,7 @@ void ContentSettingsHandler::GetLocalizedValues(
IDS_IMAGES_TAB_LABEL);
RegisterTitle(localized_strings, "javascript",
IDS_JAVASCRIPT_TAB_LABEL);
RegisterTitle(localized_strings, "plugins",
IDS_PLUGIN_TAB_LABEL);
RegisterTitle(localized_strings, "plugins", IDS_FLASH_TAB_LABEL);
RegisterTitle(localized_strings, "popups",
IDS_POPUP_TAB_LABEL);
RegisterTitle(localized_strings, "location",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment