| 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();
|
| }
|
|
|