| 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 1136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1147 profile)) { | 1147 profile)) { |
| 1148 ProfileSyncServiceFactory::GetInstance()->GetForProfile( | 1148 ProfileSyncServiceFactory::GetInstance()->GetForProfile( |
| 1149 profile)->DisableForUser(); | 1149 profile)->DisableForUser(); |
| 1150 } | 1150 } |
| 1151 | 1151 |
| 1152 bool profile_is_signed_in = !cache.GetUserNameOfProfileAtIndex( | 1152 bool profile_is_signed_in = !cache.GetUserNameOfProfileAtIndex( |
| 1153 cache.GetIndexOfProfileWithPath(profile_dir)).empty(); | 1153 cache.GetIndexOfProfileWithPath(profile_dir)).empty(); |
| 1154 ProfileMetrics::LogProfileDelete(profile_is_signed_in); | 1154 ProfileMetrics::LogProfileDelete(profile_is_signed_in); |
| 1155 // Some platforms store passwords in keychains. They should be removed. | 1155 // Some platforms store passwords in keychains. They should be removed. |
| 1156 scoped_refptr<password_manager::PasswordStore> password_store = | 1156 scoped_refptr<password_manager::PasswordStore> password_store = |
| 1157 PasswordStoreFactory::GetForProfile(profile, Profile::EXPLICIT_ACCESS) | 1157 PasswordStoreFactory::GetForProfile( |
| 1158 .get(); | 1158 profile, ServiceAccessType::EXPLICIT_ACCESS).get(); |
| 1159 if (password_store.get()) { | 1159 if (password_store.get()) { |
| 1160 password_store->RemoveLoginsCreatedBetween(base::Time(), | 1160 password_store->RemoveLoginsCreatedBetween(base::Time(), |
| 1161 base::Time::Max()); | 1161 base::Time::Max()); |
| 1162 } | 1162 } |
| 1163 } | 1163 } |
| 1164 | 1164 |
| 1165 QueueProfileDirectoryForDeletion(profile_dir); | 1165 QueueProfileDirectoryForDeletion(profile_dir); |
| 1166 cache.DeleteProfileFromCache(profile_dir); | 1166 cache.DeleteProfileFromCache(profile_dir); |
| 1167 ProfileMetrics::UpdateReportedProfilesStatistics(this); | 1167 ProfileMetrics::UpdateReportedProfilesStatistics(this); |
| 1168 } | 1168 } |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1356 last_non_supervised_profile_path.BaseName().MaybeAsASCII()); | 1356 last_non_supervised_profile_path.BaseName().MaybeAsASCII()); |
| 1357 FinishDeletingProfile(profile_to_delete_path); | 1357 FinishDeletingProfile(profile_to_delete_path); |
| 1358 } | 1358 } |
| 1359 } | 1359 } |
| 1360 } | 1360 } |
| 1361 #endif | 1361 #endif |
| 1362 | 1362 |
| 1363 ProfileManagerWithoutInit::ProfileManagerWithoutInit( | 1363 ProfileManagerWithoutInit::ProfileManagerWithoutInit( |
| 1364 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) { | 1364 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) { |
| 1365 } | 1365 } |
| OLD | NEW |