| Index: chrome/test/base/testing_profile.cc
|
| diff --git a/chrome/test/base/testing_profile.cc b/chrome/test/base/testing_profile.cc
|
| index 12ecbe99e8f953e20b415a299160ee79500a9a04..6e99b1c336dfb4e0f07e31bd7fa68072591459f6 100644
|
| --- a/chrome/test/base/testing_profile.cc
|
| +++ b/chrome/test/base/testing_profile.cc
|
| @@ -382,7 +382,6 @@ TestingProfile::TestingProfile(
|
| force_incognito_(false),
|
| original_profile_(parent),
|
| guest_session_(guest_session),
|
| - supervised_user_id_(supervised_user_id),
|
| last_session_exited_cleanly_(true),
|
| #if defined(ENABLE_EXTENSIONS)
|
| extension_special_storage_policy_(extension_policy),
|
| @@ -420,6 +419,8 @@ TestingProfile::TestingProfile(
|
| } else {
|
| FinishInit();
|
| }
|
| +
|
| + SetSupervisedUserId(supervised_user_id);
|
| }
|
|
|
| void TestingProfile::CreateTempProfileDir() {
|
| @@ -766,6 +767,14 @@ Profile* TestingProfile::GetOriginalProfile() {
|
| return this;
|
| }
|
|
|
| +void TestingProfile::SetSupervisedUserId(const std::string& id) {
|
| + supervised_user_id_ = id;
|
| + if (!id.empty())
|
| + GetPrefs()->SetString(prefs::kSupervisedUserId, id);
|
| + else
|
| + GetPrefs()->ClearPref(prefs::kSupervisedUserId);
|
| +}
|
| +
|
| bool TestingProfile::IsSupervised() {
|
| return !supervised_user_id_.empty();
|
| }
|
|
|