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 1093 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1104 profile)->DisableForUser(); | 1104 profile)->DisableForUser(); |
1105 } | 1105 } |
1106 | 1106 |
1107 bool profile_is_signed_in = !cache.GetUserNameOfProfileAtIndex( | 1107 bool profile_is_signed_in = !cache.GetUserNameOfProfileAtIndex( |
1108 cache.GetIndexOfProfileWithPath(profile_dir)).empty(); | 1108 cache.GetIndexOfProfileWithPath(profile_dir)).empty(); |
1109 ProfileMetrics::LogProfileDelete(profile_is_signed_in); | 1109 ProfileMetrics::LogProfileDelete(profile_is_signed_in); |
1110 // Some platforms store passwords in keychains. They should be removed. | 1110 // Some platforms store passwords in keychains. They should be removed. |
1111 scoped_refptr<password_manager::PasswordStore> password_store = | 1111 scoped_refptr<password_manager::PasswordStore> password_store = |
1112 PasswordStoreFactory::GetForProfile(profile, Profile::EXPLICIT_ACCESS) | 1112 PasswordStoreFactory::GetForProfile(profile, Profile::EXPLICIT_ACCESS) |
1113 .get(); | 1113 .get(); |
1114 if (password_store) { | 1114 if (password_store.get()) { |
1115 password_store->RemoveLoginsCreatedBetween(base::Time(), | 1115 password_store->RemoveLoginsCreatedBetween(base::Time(), |
1116 base::Time::Max()); | 1116 base::Time::Max()); |
1117 } | 1117 } |
1118 } | 1118 } |
1119 | 1119 |
1120 QueueProfileDirectoryForDeletion(profile_dir); | 1120 QueueProfileDirectoryForDeletion(profile_dir); |
1121 cache.DeleteProfileFromCache(profile_dir); | 1121 cache.DeleteProfileFromCache(profile_dir); |
1122 ProfileMetrics::UpdateReportedProfilesStatistics(this); | 1122 ProfileMetrics::UpdateReportedProfilesStatistics(this); |
1123 } | 1123 } |
1124 | 1124 |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1301 last_non_supervised_profile_path.BaseName().MaybeAsASCII()); | 1301 last_non_supervised_profile_path.BaseName().MaybeAsASCII()); |
1302 FinishDeletingProfile(profile_to_delete_path); | 1302 FinishDeletingProfile(profile_to_delete_path); |
1303 } | 1303 } |
1304 } | 1304 } |
1305 } | 1305 } |
1306 #endif | 1306 #endif |
1307 | 1307 |
1308 ProfileManagerWithoutInit::ProfileManagerWithoutInit( | 1308 ProfileManagerWithoutInit::ProfileManagerWithoutInit( |
1309 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) { | 1309 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) { |
1310 } | 1310 } |
OLD | NEW |