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 26c521b16ce10d8096df050f25ca132fb2bd029f..3622363f134bb8ca4fc5f3fdfc72e60b119417b6 100644 |
| --- a/chrome/browser/profiles/profile_manager.cc |
| +++ b/chrome/browser/profiles/profile_manager.cc |
| @@ -889,12 +889,18 @@ void ProfileManager::CleanUpDeletedProfiles() { |
| // Although it should never happen, make sure this is a valid path in the |
| // user_data_dir, so we don't accidentially delete something else. |
| if (is_valid_profile_path) { |
| - LOG(WARNING) << "Files of a deleted profile still exist after restart. " |
| - "Cleaning up now."; |
| - BrowserThread::PostTaskAndReply( |
| - BrowserThread::FILE, FROM_HERE, |
| - base::Bind(&NukeProfileFromDisk, profile_path), |
| - base::Bind(&ProfileCleanedUp, value.get())); |
| + if (base::PathExists(profile_path)) { |
|
msramek
2017/01/10 13:46:32
This is not a part of this CL.
dullweber
2017/01/10 17:14:38
That's right, I have no idea how I managed to get
|
| + LOG(WARNING) << "Files of a deleted profile still exist after restart. " |
| + "Cleaning up now."; |
| + BrowserThread::PostTaskAndReply( |
| + BrowserThread::FILE, FROM_HERE, |
| + base::Bind(&NukeProfileFromDisk, profile_path), |
| + base::Bind(&ProfileCleanedUp, value.get())); |
| + } else { |
| + // Everything is fine, the profile was removed on shutdown. |
| + BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, |
| + base::Bind(&ProfileCleanedUp, value.get())); |
| + } |
| } else { |
| LOG(ERROR) << "Found invalid profile path in deleted_profiles: " |
| << profile_path.AsUTF8Unsafe(); |