Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1031)

Side by Side Diff: chrome/browser/profiles/profile_manager.cc

Issue 2905903002: Delete the PreferenceMACs on profile deletion. (Closed)
Patch Set: Bring back plumbing solution, address review comments Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | components/prefs/in_memory_pref_store.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 1492 matching lines...) Expand 10 before | Expand all | Expand 10 after
1503 PasswordStoreFactory::GetForProfile( 1503 PasswordStoreFactory::GetForProfile(
1504 profile, ServiceAccessType::EXPLICIT_ACCESS).get(); 1504 profile, ServiceAccessType::EXPLICIT_ACCESS).get();
1505 if (password_store.get()) { 1505 if (password_store.get()) {
1506 password_store->RemoveLoginsCreatedBetween( 1506 password_store->RemoveLoginsCreatedBetween(
1507 base::Time(), base::Time::Max(), base::Closure()); 1507 base::Time(), base::Time::Max(), base::Closure());
1508 } 1508 }
1509 1509
1510 // The Profile Data doesn't get wiped until Chrome closes. Since we promised 1510 // The Profile Data doesn't get wiped until Chrome closes. Since we promised
1511 // that the user's data would be removed, do so immediately. 1511 // that the user's data would be removed, do so immediately.
1512 profiles::RemoveBrowsingDataForProfile(profile_dir); 1512 profiles::RemoveBrowsingDataForProfile(profile_dir);
1513
1514 // Clean-up pref data that won't be cleaned up by NukeProfileFromDisk.
1515 profile->GetPrefs()->OnStoreDeletionFromDisk();
1513 } else { 1516 } else {
1514 // It is safe to delete a not yet loaded Profile from disk. 1517 // It is safe to delete a not yet loaded Profile from disk.
gab 2017/06/06 14:48:26 The logic will go through here if the user deletes
proberge 2017/06/07 19:22:50 Done. Note that this involves added complexity to
1515 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE, 1518 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
1516 base::BindOnce(&NukeProfileFromDisk, profile_dir)); 1519 base::BindOnce(&NukeProfileFromDisk, profile_dir));
1517 } 1520 }
1518 1521
1519 // Queue even a profile that was nuked so it will be MarkedForDeletion and so 1522 // Queue even a profile that was nuked so it will be MarkedForDeletion and so
1520 // CreateProfileAsync can't create it. 1523 // CreateProfileAsync can't create it.
1521 MarkProfileDirectoryForDeletion(profile_dir); 1524 MarkProfileDirectoryForDeletion(profile_dir);
1522 storage.RemoveProfile(profile_dir); 1525 storage.RemoveProfile(profile_dir);
1523 ProfileMetrics::UpdateReportedProfilesStatistics(this); 1526 ProfileMetrics::UpdateReportedProfilesStatistics(this);
1524 } 1527 }
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
1781 1784
1782 const base::FilePath new_active_profile_dir = 1785 const base::FilePath new_active_profile_dir =
1783 found_entry ? found_entry->GetPath() : GenerateNextProfileDirectoryPath(); 1786 found_entry ? found_entry->GetPath() : GenerateNextProfileDirectoryPath();
1784 FinishDeletingProfile(profile_dir, new_active_profile_dir); 1787 FinishDeletingProfile(profile_dir, new_active_profile_dir);
1785 } 1788 }
1786 #endif // !defined(OS_ANDROID) 1789 #endif // !defined(OS_ANDROID)
1787 1790
1788 ProfileManagerWithoutInit::ProfileManagerWithoutInit( 1791 ProfileManagerWithoutInit::ProfileManagerWithoutInit(
1789 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) { 1792 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) {
1790 } 1793 }
OLDNEW
« no previous file with comments | « no previous file | components/prefs/in_memory_pref_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698