Index: chrome/browser/profiles/profile_manager.cc |
=================================================================== |
--- chrome/browser/profiles/profile_manager.cc (revision 152316) |
+++ chrome/browser/profiles/profile_manager.cc (working copy) |
@@ -270,6 +270,7 @@ |
if (ProfileShortcutManager::IsFeatureEnabled()) |
profile_shortcut_manager_.reset(ProfileShortcutManager::Create()); |
+ GetProfileInfoCache().AddObserver(profile_shortcut_manager_.get()); |
sail
2012/08/21 21:59:26
Another way to do this would be to have ProfileSho
Halli
2012/08/23 17:59:20
Done.
|
} |
ProfileManager::~ProfileManager() { |
@@ -954,13 +955,15 @@ |
} |
} |
+ // Delete possible shortcuts for this profile |
+ if (profile_shortcut_manager_.get()) |
+ profile_shortcut_manager_->DeleteChromeDesktopShortcut( |
+ profile_dir, cache.GetNameOfProfileAtIndex( |
+ cache.GetIndexOfProfileWithPath(profile_dir))); |
+ |
QueueProfileDirectoryForDeletion(profile_dir); |
cache.DeleteProfileFromCache(profile_dir); |
- // Delete possible shortcuts for this profile |
- if (profile_shortcut_manager_.get()) |
- profile_shortcut_manager_->DeleteChromeDesktopShortcut(profile_dir); |
- |
ProfileMetrics::LogNumberOfProfiles(this, |
ProfileMetrics::DELETE_PROFILE_EVENT); |
} |