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

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

Issue 2468723003: Move session service and supervised users to buildflags. (Closed)
Patch Set: Created 4 years, 1 month 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/themes/theme_service.h ('k') | chrome/browser/themes/theme_service_unittest.cc » ('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 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();
}
« no previous file with comments | « chrome/browser/themes/theme_service.h ('k') | chrome/browser/themes/theme_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698