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

Unified Diff: chrome/browser/resources/settings/privacy_page/privacy_page.js

Issue 2688793002: MD Settings: Update Protected Content for redesign (Closed)
Patch Set: fix closure issues Created 3 years, 10 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/resources/settings/privacy_page/privacy_page.js
diff --git a/chrome/browser/resources/settings/privacy_page/privacy_page.js b/chrome/browser/resources/settings/privacy_page/privacy_page.js
index 8e0c4b029c5ad5253e57388a4c64b732355b14aa..d1cb9f9d5a4e3e7f68905d128024b8261f624813 100644
--- a/chrome/browser/resources/settings/privacy_page/privacy_page.js
+++ b/chrome/browser/resources/settings/privacy_page/privacy_page.js
@@ -12,6 +12,7 @@ Polymer({
behaviors: [
settings.RouteObserverBehavior,
+ I18nBehavior,
WebUIListenerBehavior,
],
@@ -174,14 +175,15 @@ Polymer({
},
// </if>
- /**
- * Works like a ternary operator. E.g. (value ? trueLabel: falseLabel).
- * @param {boolean} value
- * @param {string} trueLabel True label (for example, 'Allow DRM').
- * @param {string} falseLabel False label (for example, 'Blocked').
- * @private
- */
- getStringTernary_: function(value, trueLabel, falseLabel) {
- return value ? trueLabel : falseLabel;
+ /** @private */
+ getProtectedContentLabel_: function(value) {
+ return value ? this.i18n('siteSettingsProtectedContentEnable')
+ : this.i18n('siteSettingsBlocked');
+ },
+
+ /** @private */
+ getProtectedContentIdentifiersLabel_: function(value) {
+ return value ? this.i18n('siteSettingsProtectedContentEnableIdentifiers')
+ : this.i18n('siteSettingsBlocked');
},
});

Powered by Google App Engine
This is Rietveld 408576698