| Index: chrome/browser/chrome_browser_main.cc
|
| diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc
|
| index 94d64620fa0528ce244baa4303e66098e8d07cbb..d1c08cbffca89ec349f9a015e3dbbaf964b20aac 100644
|
| --- a/chrome/browser/chrome_browser_main.cc
|
| +++ b/chrome/browser/chrome_browser_main.cc
|
| @@ -1077,29 +1077,8 @@ void ChromeBrowserMainParts::PreProfileInit() {
|
| // creation.
|
| feedback::FeedbackProfileObserver::Initialize();
|
|
|
| - ProfileManager* profile_manager = g_browser_process->profile_manager();
|
| -
|
| - // First check if any ephemeral profiles are left behind because of browser
|
| - // crash and schedule them for deletion and then proceed with getting the set
|
| - // of profiles to open.
|
| - ProfileInfoCache& profile_cache = profile_manager->GetProfileInfoCache();
|
| - size_t profiles_count = profile_cache.GetNumberOfProfiles();
|
| - std::vector<base::FilePath> profiles_to_delete;
|
| - for (size_t i = 0; i < profiles_count; ++i) {
|
| - if (profile_cache.ProfileIsEphemeralAtIndex(i))
|
| - profiles_to_delete.push_back(profile_cache.GetPathOfProfileAtIndex(i));
|
| - }
|
| -
|
| - if (profiles_to_delete.size()) {
|
| - for (size_t i = 0; i < profiles_to_delete.size(); ++i) {
|
| - profile_manager->ScheduleProfileForDeletion(
|
| - profiles_to_delete[i], ProfileManager::CreateCallback());
|
| - }
|
| - // Clean up stale profiles immediately after browser start.
|
| - BrowserThread::PostTask(
|
| - BrowserThread::FILE, FROM_HERE,
|
| - base::Bind(&ProfileManager::CleanUpStaleProfiles, profiles_to_delete));
|
| - }
|
| + // Ephemeral profiles may have been left behind if the browser crashed.
|
| + g_browser_process->profile_manager()->CleanUpEphemeralProfiles();
|
| #endif // !defined(OS_ANDROID)
|
|
|
| #if defined(ENABLE_EXTENSIONS)
|
|
|