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

Unified Diff: chrome/browser/profiles/avatar_menu.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
Index: chrome/browser/profiles/avatar_menu.cc
diff --git a/chrome/browser/profiles/avatar_menu.cc b/chrome/browser/profiles/avatar_menu.cc
index 95c3e916db25c9dcd347d484e7ef1970d643ec6c..76a7cc3e847a4e714221dbaa47c40d31f686a167 100644
--- a/chrome/browser/profiles/avatar_menu.cc
+++ b/chrome/browser/profiles/avatar_menu.cc
@@ -24,6 +24,7 @@
#include "chrome/browser/ui/startup/startup_browser_creator.h"
#include "chrome/browser/ui/user_manager.h"
#include "chrome/common/chrome_switches.h"
+#include "chrome/common/features.h"
#include "chrome/grit/generated_resources.h"
#include "chrome/grit/theme_resources.h"
#include "components/signin/core/common/profile_management_switches.h"
@@ -32,7 +33,7 @@
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
-#if defined(ENABLE_SUPERVISED_USERS)
+#if BUILDFLAG(ENABLE_SUPERVISED_USERS)
#include "chrome/browser/supervised_user/supervised_user_service.h"
#include "chrome/browser/supervised_user/supervised_user_service_factory.h"
#endif
@@ -44,7 +45,7 @@ AvatarMenu::AvatarMenu(ProfileAttributesStorage* profile_storage,
Browser* browser)
: profile_list_(ProfileList::Create(profile_storage)),
menu_actions_(AvatarMenuActions::Create()),
-#if defined(ENABLE_SUPERVISED_USERS)
+#if BUILDFLAG(ENABLE_SUPERVISED_USERS)
supervised_user_observer_(this),
#endif
profile_storage_(profile_storage),
@@ -58,7 +59,7 @@ AvatarMenu::AvatarMenu(ProfileAttributesStorage* profile_storage,
// Register this as an observer of the info cache.
profile_storage_->AddObserver(this);
-#if defined(ENABLE_SUPERVISED_USERS)
+#if BUILDFLAG(ENABLE_SUPERVISED_USERS)
// Register this as an observer of the SupervisedUserService to be notified
// of changes to the custodian info.
if (browser_) {
@@ -167,7 +168,7 @@ size_t AvatarMenu::GetActiveProfileIndex() {
base::string16 AvatarMenu::GetSupervisedUserInformation() const {
// |browser_| can be NULL in unit_tests.
if (browser_ && browser_->profile()->IsSupervised()) {
-#if defined(ENABLE_SUPERVISED_USERS)
+#if BUILDFLAG(ENABLE_SUPERVISED_USERS)
SupervisedUserService* service =
SupervisedUserServiceFactory::GetForProfile(browser_->profile());
base::string16 custodian =
@@ -250,7 +251,7 @@ void AvatarMenu::OnProfileIsOmittedChanged(const base::FilePath& profile_path) {
Update();
}
-#if defined(ENABLE_SUPERVISED_USERS)
+#if BUILDFLAG(ENABLE_SUPERVISED_USERS)
void AvatarMenu::OnCustodianInfoChanged() {
Update();
}
« no previous file with comments | « chrome/browser/profiles/avatar_menu.h ('k') | chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698