Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4741)

Unified Diff: chrome/browser/chrome_browser_main.cc

Issue 128413003: Revert profile cleanup temporarily to verify regression is really caused by it. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_browser_main.cc
diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc
index 7271cb814faaa0fb3d33d6db8e5671634bb5f5de..f5f8bbf4222bfc8412f7652ef0c8390c9c93bcfe 100644
--- a/chrome/browser/chrome_browser_main.cc
+++ b/chrome/browser/chrome_browser_main.cc
@@ -1041,32 +1041,6 @@ void ChromeBrowserMainParts::PreProfileInit() {
for (size_t i = 0; i < chrome_extra_parts_.size(); ++i)
chrome_extra_parts_[i]->PreProfileInit();
-
-#if !defined(OS_ANDROID)
- 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));
- }
-#endif // OS_ANDROID
}
void ChromeBrowserMainParts::PostProfileInit() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698