Chromium Code Reviews| Index: chrome/browser/profiles/profile_manager.cc |
| diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profiles/profile_manager.cc |
| index 408917b51b3da022007259e6433faaca16fc7158..a570924f160d9b209b6df2ee5c872cb07edbf2db 100644 |
| --- a/chrome/browser/profiles/profile_manager.cc |
| +++ b/chrome/browser/profiles/profile_manager.cc |
| @@ -393,7 +393,7 @@ void ProfileManager::CreateProfileAsync( |
| const CreateCallback& callback, |
| const base::string16& name, |
| const base::string16& icon_url, |
| - const std::string& supervised_user_id) { |
| + const user_manager::UserID& supervised_user_id) { |
| DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| TRACE_EVENT1("browser,startup", |
| "ProfileManager::CreateProfileAsync", |
| @@ -574,7 +574,7 @@ base::FilePath ProfileManager::CreateMultiProfileAsync( |
| const base::string16& name, |
| const base::string16& icon_url, |
| const CreateCallback& callback, |
| - const std::string& supervised_user_id) { |
| + const user_manager::UserID& supervised_user_id) { |
| DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| ProfileManager* profile_manager = g_browser_process->profile_manager(); |
| @@ -695,7 +695,7 @@ void ProfileManager::ScheduleProfileForDeletion( |
| callback), |
| new_profile_name, |
| new_avatar_url, |
| - std::string()); |
| + user_manager::UserID(std::string(), std::string())); |
|
Denis Kuznetsov (DE-MUC)
2015/06/10 16:50:45
EmptyUserID
|
| ProfileMetrics::LogProfileAddNewUser( |
| ProfileMetrics::ADD_NEW_USER_LAST_DELETED); |
| @@ -718,7 +718,7 @@ void ProfileManager::ScheduleProfileForDeletion( |
| callback), |
| base::string16(), |
| base::string16(), |
| - std::string()); |
| + user_manager::UserID(std::string(), std::string())); |
|
Denis Kuznetsov (DE-MUC)
2015/06/10 16:50:44
EmtpyUserID
|
| return; |
| } |
| #endif // defined(OS_MACOSX) |
| @@ -796,7 +796,7 @@ void ProfileManager::InitProfileUserPrefs(Profile* profile) { |
| size_t avatar_index; |
| std::string profile_name; |
| - std::string supervised_user_id; |
| + user_manager::UserID supervised_user_id = user_manager::UserID(std::string(), std::string()); |
|
Denis Kuznetsov (DE-MUC)
2015/06/10 16:50:45
EmptyUserID
|
| if (profile->IsGuestSession()) { |
| profile_name = l10n_util::GetStringUTF8(IDS_PROFILES_GUEST_PROFILE_NAME); |
| avatar_index = 0; |
| @@ -841,13 +841,13 @@ void ProfileManager::InitProfileUserPrefs(Profile* profile) { |
| #endif |
| command_line->HasSwitch(switches::kSupervisedUserId); |
| if (force_supervised_user_id) { |
| - supervised_user_id = |
| - command_line->GetSwitchValueASCII(switches::kSupervisedUserId); |
| + supervised_user_id = user_manager::UserID::FromUserEmail( |
| + command_line->GetSwitchValueASCII(switches::kSupervisedUserId)); |
| } |
| if (force_supervised_user_id || |
| !profile->GetPrefs()->HasPrefPath(prefs::kSupervisedUserId)) { |
| profile->GetPrefs()->SetString(prefs::kSupervisedUserId, |
| - supervised_user_id); |
| + supervised_user_id.GetUserEmail()); |
| } |
| } |
| @@ -1310,8 +1310,8 @@ void ProfileManager::AddProfileToCache(Profile* profile) { |
| size_t icon_index = profile->GetPrefs()->GetInteger( |
| prefs::kProfileAvatarIndex); |
| - std::string supervised_user_id = |
| - profile->GetPrefs()->GetString(prefs::kSupervisedUserId); |
| + const user_manager::UserID& supervised_user_id = |
| + user_manager::UserID::FromUserEmail(profile->GetPrefs()->GetString(prefs::kSupervisedUserId)); |
| cache.AddProfileToCache(profile->GetPath(), |
| profile_name, |