| 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..b4df47d887fac0ed284bc38c6c4976a6c0708444 100644
|
| --- a/chrome/browser/profiles/profile_manager.cc
|
| +++ b/chrome/browser/profiles/profile_manager.cc
|
| @@ -599,6 +599,16 @@ base::FilePath ProfileManager::GetGuestProfilePath() {
|
| return guest_path.Append(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.Append(chrome::kUserManagerProfileDir);
|
| +}
|
| +
|
| base::FilePath ProfileManager::GenerateNextProfileDirectoryPath() {
|
| PrefService* local_state = g_browser_process->local_state();
|
| DCHECK(local_state);
|
| @@ -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())
|
|
|