Chromium Code Reviews| Index: chrome/browser/profiles/profile_info_cache.cc |
| =================================================================== |
| --- chrome/browser/profiles/profile_info_cache.cc (revision 120769) |
| +++ chrome/browser/profiles/profile_info_cache.cc (working copy) |
| @@ -32,6 +32,10 @@ |
| #include "ui/gfx/image/image.h" |
| #include "ui/gfx/image/image_util.h" |
| +#if defined(OS_WIN) |
| +#include "chrome/installer/util/auto_launch_util.h" |
| +#endif |
| + |
| using content::BrowserThread; |
| namespace { |
| @@ -163,6 +167,17 @@ |
| file_util::Delete(image_path, false); |
| } |
| +#if defined(OS_WIN) |
| +void DeleteAutoLaunchValueForProfile( |
| + const FilePath& profile_path) { |
| + if (auto_launch_util::WillLaunchAtLogin(FilePath(), |
| + profile_path.BaseName().value())) { |
| + auto_launch_util::SetWillLaunchAtLogin( |
| + false, FilePath(), profile_path.BaseName().value()); |
| + } |
| +} |
| +#endif |
| + |
| } // namespace |
| ProfileInfoCache::ProfileInfoCache(PrefService* prefs, |
| @@ -238,6 +253,12 @@ |
| cache->Remove(key, NULL); |
| sorted_keys_.erase(std::find(sorted_keys_.begin(), sorted_keys_.end(), key)); |
| +#if defined(OS_WIN) |
| + BrowserThread::PostTask( |
| + BrowserThread::FILE, FROM_HERE, |
| + base::Bind(&DeleteAutoLaunchValueForProfile, profile_path)); |
|
grt (UTC plus 2)
2012/02/09 16:43:50
shouldn't this be more like the ProfileShortcutMan
|
| +#endif |
| + |
| FOR_EACH_OBSERVER(ProfileInfoCacheObserver, |
| observer_list_, |
| OnProfileWasRemoved(profile_path, name)); |