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

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

Issue 2426863002: MD Settings: don't allow supervised users to switch to GTK+ theme (Closed)
Patch Set: Created 4 years, 2 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/appearance_page/appearance_page.js
diff --git a/chrome/browser/resources/settings/appearance_page/appearance_page.js b/chrome/browser/resources/settings/appearance_page/appearance_page.js
index bde7e1c8e9b5e54768aabeb6f92cb1e6842cbc34..f6468a2c3e67ed7728125b9c224aafc7d6189701 100644
--- a/chrome/browser/resources/settings/appearance_page/appearance_page.js
+++ b/chrome/browser/resources/settings/appearance_page/appearance_page.js
@@ -173,23 +173,32 @@ Polymer({
},
/**
- * @param {string} themeId
- * @param {boolean} useSystemTheme
* @return {boolean} Whether to show the "USE CLASSIC" button.
* @private
*/
- showUseClassic_: function(themeId, useSystemTheme) {
- return !!themeId || useSystemTheme;
+ showUseClassic_: function() {
+ if (this.useSystemTheme_)
+ return true;
+ return !!this.get('prefs.extensions.theme.id.value');
dpapad 2016/10/18 17:49:34 Nit: return this.useSystemTheme_ || !!this.get('pr
Dan Beam 2016/10/18 18:59:52 see updated code
},
/**
- * @param {string} themeId
- * @param {boolean} useSystemTheme
* @return {boolean} Whether to show the "USE GTK+" button.
* @private
*/
- showUseSystem_: function(themeId, useSystemTheme) {
- return !!themeId || !useSystemTheme;
+ showUseSystem_: function() {
+ if (this.useSystemTheme_ || loadTimeData.getBoolean('isSupervised'))
+ return false;
+ return !!this.get('prefs.extensions.theme.id.value');
+ },
+
+ /**
+ * @return {boolean} Whether to show the secondary area where "USE CLASSIC"
+ * and "USE GTK+" buttons live.
+ * @private
+ */
+ showThemesSecondary_: function() {
+ return this.showUseClassic_() || this.showUseSystem_();
},
/** @private */

Powered by Google App Engine
This is Rietveld 408576698