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

Unified Diff: chrome/browser/themes/theme_service.cc

Issue 2928823003: Make it possible to build without enable_supervised_users.
Patch Set: Does it still compile with the feature enabled? Created 3 years, 6 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
« no previous file with comments | « chrome/browser/sync/supervised_user_signin_manager_wrapper.h ('k') | chrome/browser/ui/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/themes/theme_service.cc
diff --git a/chrome/browser/themes/theme_service.cc b/chrome/browser/themes/theme_service.cc
index 0b7525c2f0d2db3a9d9d5f21a40412aa23ab0470..a29ca2151f8c2f95f469ac167c8ca7a693846da8 100644
--- a/chrome/browser/themes/theme_service.cc
+++ b/chrome/browser/themes/theme_service.cc
@@ -419,8 +419,6 @@ SkColor ThemeService::GetDefaultColor(int id, bool incognito) const {
// For backward compat with older themes, some newer colors are generated from
// older ones if they are missing.
const int kNtpText = ThemeProperties::COLOR_NTP_TEXT;
- const int kLabelBackground =
- ThemeProperties::COLOR_SUPERVISED_USER_LABEL_BACKGROUND;
switch (id) {
case ThemeProperties::COLOR_TOOLBAR_BUTTON_ICON:
return color_utils::HSLShift(
@@ -495,9 +493,12 @@ SkColor ThemeService::GetDefaultColor(int id, bool incognito) const {
return color_utils::HSLShift(base_color, hsl);
}
#if BUILDFLAG(ENABLE_SUPERVISED_USERS)
- case ThemeProperties::COLOR_SUPERVISED_USER_LABEL:
+ case ThemeProperties::COLOR_SUPERVISED_USER_LABEL: {
+ constexpr int kLabelBackground =
+ ThemeProperties::COLOR_SUPERVISED_USER_LABEL_BACKGROUND;
return color_utils::GetReadableColor(
SK_ColorWHITE, GetColor(kLabelBackground, incognito));
+ }
case ThemeProperties::COLOR_SUPERVISED_USER_LABEL_BACKGROUND:
return color_utils::BlendTowardOppositeLuma(
GetColor(ThemeProperties::COLOR_FRAME, incognito), 0x80);
« no previous file with comments | « chrome/browser/sync/supervised_user_signin_manager_wrapper.h ('k') | chrome/browser/ui/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698