| Index: chrome/browser/profiles/profile_manager.cc
|
| diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profiles/profile_manager.cc
|
| index 0f2292dfed810a657571a2e7d6ba828939e9076c..c9a11303d2003a742bd791356a574ec7dfeb76e7 100644
|
| --- a/chrome/browser/profiles/profile_manager.cc
|
| +++ b/chrome/browser/profiles/profile_manager.cc
|
| @@ -596,7 +596,17 @@ base::FilePath ProfileManager::GetGuestProfilePath() {
|
| ProfileManager* profile_manager = g_browser_process->profile_manager();
|
|
|
| base::FilePath guest_path = profile_manager->user_data_dir();
|
| - return guest_path.Append(chrome::kGuestProfileDir);
|
| + return guest_path.AppendASCII(chrome::kGuestProfileDir);
|
| +}
|
| +
|
| +// static
|
| +base::FilePath ProfileManager::GetUserManagerProfilePath() {
|
| + DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| +
|
| + ProfileManager* profile_manager = g_browser_process->profile_manager();
|
| +
|
| + base::FilePath profile_path = profile_manager->user_data_dir();
|
| + return profile_path.AppendASCII(chrome::kUserManagerProfileDir);
|
| }
|
|
|
| base::FilePath ProfileManager::GenerateNextProfileDirectoryPath() {
|
| @@ -1120,7 +1130,9 @@ ProfileManager::ProfileInfo* ProfileManager::GetProfileInfoByPath(
|
| }
|
|
|
| void ProfileManager::AddProfileToCache(Profile* profile) {
|
| - if (profile->IsGuestSession())
|
| + // Don't add guest profiles or the generic user manager profile to the cache.
|
| + if (profile->IsGuestSession() ||
|
| + profile->GetPath() == ProfileManager::GetUserManagerProfilePath())
|
| return;
|
| ProfileInfoCache& cache = GetProfileInfoCache();
|
| if (profile->GetPath().DirName() != cache.GetUserDataDir())
|
|
|