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) { |
|
Mike Lerman
2017/03/01 14:24:29
If this is supposed to only be used for Ephemeral
palar
2017/03/01 16:51:44
It would be an overkill, but hey, why not.
|
| + FinishDeletingProfile(profile_dir, GenerateNextProfileDirectoryPath()); |
| +} |
| + |
| #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. |
|
Mike Lerman
2017/03/01 14:24:29
We're skipping the call to BrowserList::CloseAllBr
palar
2017/03/01 16:51:44
This call happened only on last browser with this
Mike Lerman
2017/03/01 17:44:30
Ok. If we're not going to make sure programmatical
palar
2017/03/01 19:11:22
DCHECK I can do.
|
| - 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 |