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

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: 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 faf61cdc338e509f348f629804af924de2084eba..d2555676d64dda59307f8bef1000d2508b526241 100644
--- a/chrome/browser/resources/settings/privacy_page/privacy_page.js
+++ b/chrome/browser/resources/settings/privacy_page/privacy_page.js
@@ -173,4 +173,14 @@ Polymer({
'documentation/en/flashplayer/help/settings_manager07.html');
},
// </if>
+
+ /**
+ * @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) {
tommycli 2017/02/07 00:32:09 This function is available on all platforms becaus
dschuyler 2017/02/07 21:46:31 Is the name from the ? : ternary operator? Maybe a
tommycli 2017/02/07 22:00:07 Done.
+ return value ? trueLabel : falseLabel;
+ },
});

Powered by Google App Engine
This is Rietveld 408576698