| 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 <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 1358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1369 syncer::PROFILE_DESTRUCTION, | 1369 syncer::PROFILE_DESTRUCTION, |
| 1370 syncer::STOP_SOURCE_LIMIT); | 1370 syncer::STOP_SOURCE_LIMIT); |
| 1371 } | 1371 } |
| 1372 // Ensure data is cleared even if sync was already off. | 1372 // Ensure data is cleared even if sync was already off. |
| 1373 ProfileSyncServiceFactory::GetInstance()->GetForProfile( | 1373 ProfileSyncServiceFactory::GetInstance()->GetForProfile( |
| 1374 profile)->RequestStop(ProfileSyncService::CLEAR_DATA); | 1374 profile)->RequestStop(ProfileSyncService::CLEAR_DATA); |
| 1375 } | 1375 } |
| 1376 | 1376 |
| 1377 ProfileAttributesEntry* entry; | 1377 ProfileAttributesEntry* entry; |
| 1378 bool has_entry = storage.GetProfileAttributesWithPath(profile_dir, &entry); | 1378 bool has_entry = storage.GetProfileAttributesWithPath(profile_dir, &entry); |
| 1379 DCHECK(has_entry); | 1379 if (has_entry) |
| 1380 ProfileMetrics::LogProfileDelete(entry->IsAuthenticated()); | 1380 ProfileMetrics::LogProfileDelete(entry->IsAuthenticated()); |
| 1381 // Some platforms store passwords in keychains. They should be removed. | 1381 // Some platforms store passwords in keychains. They should be removed. |
| 1382 scoped_refptr<password_manager::PasswordStore> password_store = | 1382 scoped_refptr<password_manager::PasswordStore> password_store = |
| 1383 PasswordStoreFactory::GetForProfile( | 1383 PasswordStoreFactory::GetForProfile( |
| 1384 profile, ServiceAccessType::EXPLICIT_ACCESS).get(); | 1384 profile, ServiceAccessType::EXPLICIT_ACCESS).get(); |
| 1385 if (password_store.get()) { | 1385 if (password_store.get()) { |
| 1386 password_store->RemoveLoginsCreatedBetween( | 1386 password_store->RemoveLoginsCreatedBetween( |
| 1387 base::Time(), base::Time::Max(), base::Closure()); | 1387 base::Time(), base::Time::Max(), base::Closure()); |
| 1388 } | 1388 } |
| 1389 | 1389 |
| 1390 // The Profile Data doesn't get wiped until Chrome closes. Since we promised | 1390 // The Profile Data doesn't get wiped until Chrome closes. Since we promised |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1624 | 1624 |
| 1625 FinishDeletingProfile(profile_to_delete_path, new_active_profile_path); | 1625 FinishDeletingProfile(profile_to_delete_path, new_active_profile_path); |
| 1626 if (!original_callback.is_null()) | 1626 if (!original_callback.is_null()) |
| 1627 original_callback.Run(loaded_profile, status); | 1627 original_callback.Run(loaded_profile, status); |
| 1628 } | 1628 } |
| 1629 #endif // !defined(OS_ANDROID) | 1629 #endif // !defined(OS_ANDROID) |
| 1630 | 1630 |
| 1631 ProfileManagerWithoutInit::ProfileManagerWithoutInit( | 1631 ProfileManagerWithoutInit::ProfileManagerWithoutInit( |
| 1632 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) { | 1632 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) { |
| 1633 } | 1633 } |
| OLD | NEW |