| Index: chrome/browser/profiles/profile_manager.cc
|
| diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profiles/profile_manager.cc
|
| index a1d792243b5e89c9dd1492ceff3729165a00774c..5aff86ce6bf13cc3627518c0b9f309f5b1a26a8d 100644
|
| --- a/chrome/browser/profiles/profile_manager.cc
|
| +++ b/chrome/browser/profiles/profile_manager.cc
|
| @@ -503,7 +503,11 @@ ProfileManager::GetSortedProfilesFromDirectoryMap() {
|
| return profiles;
|
| }
|
|
|
| -ProfileInfoCache& ProfileManager::GetProfileInfoCache() {
|
| +ProfileInfoInterface& ProfileManager::GetProfileInfo() {
|
| + return GetMutableProfileInfo();
|
| +}
|
| +
|
| +ProfileInfoCache& ProfileManager::GetMutableProfileInfo() {
|
| if (!profile_info_cache_.get()) {
|
| FilePath user_data_dir;
|
| PathService::Get(chrome::DIR_USER_DATA, &user_data_dir);
|
| @@ -514,7 +518,7 @@ ProfileInfoCache& ProfileManager::GetProfileInfoCache() {
|
| }
|
|
|
| void ProfileManager::AddProfileToCache(Profile* profile) {
|
| - ProfileInfoCache& cache = GetProfileInfoCache();
|
| + ProfileInfoCache& cache = GetMutableProfileInfo();
|
| if (profile->GetPath().DirName() != cache.GetUserDataDir())
|
| return;
|
|
|
| @@ -553,8 +557,7 @@ void ProfileManager::ScheduleProfileForDeletion(const FilePath& profile_dir) {
|
| if (profile)
|
| BrowserList::CloseAllBrowsersWithProfile(profile);
|
| profiles_to_delete_.push_back(profile_dir);
|
| - ProfileInfoCache& cache = GetProfileInfoCache();
|
| - cache.DeleteProfileFromCache(profile_dir);
|
| + GetMutableProfileInfo().DeleteProfileFromCache(profile_dir);
|
| }
|
|
|
| // static
|
|
|