Index: chrome/browser/themes/theme_service.cc |
diff --git a/chrome/browser/themes/theme_service.cc b/chrome/browser/themes/theme_service.cc |
index 9f616658d2b0190e4d9462f46e8a041eb71b5071..2604f4a1028746d15330de03e2590194c7311677 100644 |
--- a/chrome/browser/themes/theme_service.cc |
+++ b/chrome/browser/themes/theme_service.cc |
@@ -26,6 +26,7 @@ |
#include "chrome/browser/themes/theme_service_factory.h" |
#include "chrome/browser/themes/theme_syncable_service.h" |
#include "chrome/common/chrome_constants.h" |
+#include "chrome/common/features.h" |
#include "chrome/common/pref_names.h" |
#include "chrome/grit/theme_resources.h" |
#include "components/grit/components_scaled_resources.h" |
@@ -50,7 +51,7 @@ |
#include "extensions/browser/extension_registry_observer.h" |
#endif |
-#if defined(ENABLE_SUPERVISED_USERS) |
+#if BUILDFLAG(ENABLE_SUPERVISED_USERS) |
#include "chrome/browser/supervised_user/supervised_user_theme.h" |
#endif |
@@ -301,7 +302,7 @@ void ThemeService::SetTheme(const Extension* extension) { |
void ThemeService::UseDefaultTheme() { |
if (ready_) |
content::RecordAction(UserMetricsAction("Themes_Reset")); |
-#if defined(ENABLE_SUPERVISED_USERS) |
+#if BUILDFLAG(ENABLE_SUPERVISED_USERS) |
if (IsSupervisedUser()) { |
SetSupervisedUserTheme(); |
return; |
@@ -498,7 +499,7 @@ SkColor ThemeService::GetDefaultColor(int id, bool incognito) const { |
color_utils::HSL hsl = GetTint(ThemeProperties::TINT_BUTTONS, incognito); |
return color_utils::HSLShift(base_color, hsl); |
} |
-#if defined(ENABLE_SUPERVISED_USERS) |
+#if BUILDFLAG(ENABLE_SUPERVISED_USERS) |
case ThemeProperties::COLOR_SUPERVISED_USER_LABEL: |
return color_utils::GetReadableColor( |
SK_ColorWHITE, GetColor(kLabelBackground, incognito)); |
@@ -555,7 +556,7 @@ void ThemeService::LoadThemePrefs() { |
std::string current_id = GetThemeID(); |
if (current_id == kDefaultThemeID) { |
-#if defined(ENABLE_SUPERVISED_USERS) |
+#if BUILDFLAG(ENABLE_SUPERVISED_USERS) |
// Supervised users have a different default theme. |
if (IsSupervisedUser()) { |
SetSupervisedUserTheme(); |
@@ -871,7 +872,7 @@ void ThemeService::BuildFromExtension(const Extension* extension) { |
SwapThemeSupplier(pack); |
} |
-#if defined(ENABLE_SUPERVISED_USERS) |
+#if BUILDFLAG(ENABLE_SUPERVISED_USERS) |
bool ThemeService::IsSupervisedUser() const { |
return profile_->IsSupervised(); |
} |