diff options
author | jeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-02 21:26:01 +0000 |
---|---|---|
committer | jeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-02 21:26:01 +0000 |
commit | a0cbe31d5bec3ae2b824b87d5a97e261a824f75c (patch) | |
tree | 62c369fd0d9f61ad120638abd12892c975b2672b /chrome/browser/profiles/profile_manager.cc | |
parent | c6b2c217219c4b8d8c89ae99c5415a1631231883 (diff) | |
download | chromium_src-a0cbe31d5bec3ae2b824b87d5a97e261a824f75c.zip chromium_src-a0cbe31d5bec3ae2b824b87d5a97e261a824f75c.tar.gz chromium_src-a0cbe31d5bec3ae2b824b87d5a97e261a824f75c.tar.bz2 |
Disable sync immediately when deleting a profile
BUG=105813
TEST=Create a new profile and enable sync, then delete that profile. Profile deletion should succeed, sync should continue to operate for other accounts and sync data from the deleted account shouldn't be affected.
Review URL: http://codereview.chromium.org/8772028
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112785 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/profiles/profile_manager.cc')
-rw-r--r-- | chrome/browser/profiles/profile_manager.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profiles/profile_manager.cc index 3f26b73..1078a74 100644 --- a/chrome/browser/profiles/profile_manager.cc +++ b/chrome/browser/profiles/profile_manager.cc @@ -676,9 +676,14 @@ void ProfileManager::ScheduleProfileForDeletion(const FilePath& profile_dir) { // TODO(sail): Due to bug 88586 we don't delete the profile instance. Once we // start deleting the profile instance we need to close background apps too. Profile* profile = GetProfileByPath(profile_dir); - if (profile) + if (profile) { BrowserList::CloseAllBrowsersWithProfile(profile); + // Disable sync for doomed profile. + if (profile->HasProfileSyncService()) + profile->GetProfileSyncService()->DisableForUser(); + } + QueueProfileDirectoryForDeletion(profile_dir); cache.DeleteProfileFromCache(profile_dir); } |