| Index: chrome/test/base/testing_profile.cc
|
| diff --git a/chrome/test/base/testing_profile.cc b/chrome/test/base/testing_profile.cc
|
| index f67cb42419726a1f737fb6b8d364ddf36fd2d2bf..a424fb3e4ddabc2c57ca1395f4f096e70ebb95f9 100644
|
| --- a/chrome/test/base/testing_profile.cc
|
| +++ b/chrome/test/base/testing_profile.cc
|
| @@ -467,14 +467,17 @@ void TestingProfile::Init() {
|
| }
|
| #endif
|
|
|
| - if (prefs_.get())
|
| + if (prefs_.get()) {
|
| user_prefs::UserPrefs::Set(this, prefs_.get());
|
| - else if (IsOffTheRecord())
|
| + } else if (IsOffTheRecord()) {
|
| CreateIncognitoPrefService();
|
| - else if (!supervised_user_id_.empty())
|
| + } else if (!supervised_user_id_.empty()) {
|
| +#if BUILDFLAG(ENABLE_SUPERVISED_USERS)
|
| CreatePrefServiceForSupervisedUser();
|
| - else
|
| +#endif
|
| + } else {
|
| CreateTestingPrefService();
|
| + }
|
|
|
| if (!base::PathExists(profile_path_))
|
| base::CreateDirectory(profile_path_);
|
| @@ -803,6 +806,7 @@ void TestingProfile::CreateTestingPrefService() {
|
| chrome::RegisterUserProfilePrefs(testing_prefs_->registry());
|
| }
|
|
|
| +#if BUILDFLAG(ENABLE_SUPERVISED_USERS)
|
| void TestingProfile::CreatePrefServiceForSupervisedUser() {
|
| DCHECK(!prefs_.get());
|
| DCHECK(!supervised_user_id_.empty());
|
| @@ -821,6 +825,7 @@ void TestingProfile::CreatePrefServiceForSupervisedUser() {
|
| chrome::RegisterUserProfilePrefs(registry.get());
|
| user_prefs::UserPrefs::Set(this, prefs_.get());
|
| }
|
| +#endif
|
|
|
| void TestingProfile::CreateIncognitoPrefService() {
|
| DCHECK(original_profile_);
|
|
|