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

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

Issue 2677413002: MD Settings: Make Protected Content toggle change label text on toggle (Closed)
Patch Set: update parens 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
« no previous file with comments | « chrome/browser/resources/settings/privacy_page/privacy_page.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 faf61cdc338e509f348f629804af924de2084eba..8e0c4b029c5ad5253e57388a4c64b732355b14aa 100644
--- a/chrome/browser/resources/settings/privacy_page/privacy_page.js
+++ b/chrome/browser/resources/settings/privacy_page/privacy_page.js
@@ -173,4 +173,15 @@ Polymer({
'documentation/en/flashplayer/help/settings_manager07.html');
},
// </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;
+ },
});
« no previous file with comments | « chrome/browser/resources/settings/privacy_page/privacy_page.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698