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

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: split tests 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..69a745f270503f25acc473e8346401a0c502e018 100644
--- a/chrome/browser/resources/settings/appearance_page/appearance_page.js
+++ b/chrome/browser/resources/settings/appearance_page/appearance_page.js
@@ -189,7 +189,19 @@ Polymer({
* @private
*/
showUseSystem_: function(themeId, useSystemTheme) {
- return !!themeId || !useSystemTheme;
+ return (!!themeId || !useSystemTheme) && !this.browserProxy_.isSupervised();
+ },
+
+ /**
+ * @param {string} themeId
+ * @param {boolean} useSystemTheme
+ * @return {boolean} Whether to show the secondary area where "USE CLASSIC"
+ * and "USE GTK+" buttons live.
+ * @private
+ */
+ showThemesSecondary_: function(themeId, useSystemTheme) {
+ return this.showUseClassic_(themeId, useSystemTheme) ||
+ this.showUseSystem_(themeId, useSystemTheme);
},
/** @private */

Powered by Google App Engine
This is Rietveld 408576698