| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/profiles/profile_manager.h" | 5 #include "chrome/browser/profiles/profile_manager.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 1082 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1093 DCHECK(DownloadServiceFactory::GetForBrowserContext(profile)-> | 1093 DCHECK(DownloadServiceFactory::GetForBrowserContext(profile)-> |
| 1094 NonMaliciousDownloadCount() == 0); | 1094 NonMaliciousDownloadCount() == 0); |
| 1095 BrowserList::CloseAllBrowsersWithProfile(profile); | 1095 BrowserList::CloseAllBrowsersWithProfile(profile); |
| 1096 | 1096 |
| 1097 // Disable sync for doomed profile. | 1097 // Disable sync for doomed profile. |
| 1098 if (ProfileSyncServiceFactory::GetInstance()->HasProfileSyncService( | 1098 if (ProfileSyncServiceFactory::GetInstance()->HasProfileSyncService( |
| 1099 profile)) { | 1099 profile)) { |
| 1100 ProfileSyncServiceFactory::GetInstance()->GetForProfile( | 1100 ProfileSyncServiceFactory::GetInstance()->GetForProfile( |
| 1101 profile)->DisableForUser(); | 1101 profile)->DisableForUser(); |
| 1102 } | 1102 } |
| 1103 |
| 1104 bool profile_is_signed_in = !cache.GetUserNameOfProfileAtIndex( |
| 1105 cache.GetIndexOfProfileWithPath(profile_dir)).empty(); |
| 1106 ProfileMetrics::LogProfileDelete(profile_is_signed_in); |
| 1103 } | 1107 } |
| 1104 | 1108 |
| 1105 QueueProfileDirectoryForDeletion(profile_dir); | 1109 QueueProfileDirectoryForDeletion(profile_dir); |
| 1106 cache.DeleteProfileFromCache(profile_dir); | 1110 cache.DeleteProfileFromCache(profile_dir); |
| 1107 ProfileMetrics::UpdateReportedProfilesStatistics(this); | 1111 ProfileMetrics::UpdateReportedProfilesStatistics(this); |
| 1108 } | 1112 } |
| 1109 | 1113 |
| 1110 ProfileManager::ProfileInfo* ProfileManager::RegisterProfile( | 1114 ProfileManager::ProfileInfo* ProfileManager::RegisterProfile( |
| 1111 Profile* profile, | 1115 Profile* profile, |
| 1112 bool created) { | 1116 bool created) { |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1289 last_non_supervised_profile_path.BaseName().MaybeAsASCII()); | 1293 last_non_supervised_profile_path.BaseName().MaybeAsASCII()); |
| 1290 FinishDeletingProfile(profile_to_delete_path); | 1294 FinishDeletingProfile(profile_to_delete_path); |
| 1291 } | 1295 } |
| 1292 } | 1296 } |
| 1293 } | 1297 } |
| 1294 #endif | 1298 #endif |
| 1295 | 1299 |
| 1296 ProfileManagerWithoutInit::ProfileManagerWithoutInit( | 1300 ProfileManagerWithoutInit::ProfileManagerWithoutInit( |
| 1297 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) { | 1301 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) { |
| 1298 } | 1302 } |
| OLD | NEW |