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 2735519ad44c3de93ba549f0c84a1cfce7d33e00..09859b0c7a70b5f85bf27ab388b0ba7739974cfb 100644 |
| --- a/chrome/browser/profiles/profile_manager.cc |
| +++ b/chrome/browser/profiles/profile_manager.cc |
| @@ -812,6 +812,12 @@ void ProfileManager::ScheduleProfileForDeletion( |
| EnsureActiveProfileExistsBeforeDeletion(callback, profile_dir); |
| } |
| } |
| + |
| +void ProfileManager::ScheduleForcedEphemeralProfileForDeletion( |
| + const base::FilePath& profile_dir) { |
| + FinishDeletingProfile(profile_dir, GenerateNextProfileDirectoryPath()); |
|
Bernhard Bauer
2017/02/15 18:03:30
Just to confirm: This updates the last used profil
palar
2017/02/16 10:39:04
Exacly.
Upon browser start a new profile at the sp
|
| +} |
| + |
| #endif // !defined(OS_ANDROID) |
| void ProfileManager::AutoloadProfiles() { |
| @@ -1666,8 +1672,8 @@ void ProfileManager::BrowserListObserver::OnBrowserRemoved( |
| // Do nothing if the profile is already being deleted. |
| } else if (profile->GetPrefs()->GetBoolean(prefs::kForceEphemeralProfiles)) { |
| // Delete if the profile is an ephemeral profile. |
| - g_browser_process->profile_manager()->ScheduleProfileForDeletion( |
| - path, ProfileManager::CreateCallback()); |
| + g_browser_process->profile_manager() |
| + ->ScheduleForcedEphemeralProfileForDeletion(path); |
| } else { |
| #if !defined(OS_ANDROID) && !defined(OS_IOS) && !defined(OS_CHROMEOS) |
| // Gather statistics and store into ProfileInfoCache. For incognito profile |