Chromium Code Reviews| 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 */ |