summaryrefslogtreecommitdiffstats
path: root/chrome/browser/profiles/profile_manager.cc
diff options
context:
space:
mode:
authormirandac@chromium.org <mirandac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-22 14:58:23 +0000
committermirandac@chromium.org <mirandac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-22 14:58:23 +0000
commitf8b2ca3555497caedc341ec16f110e310c15562d (patch)
treee9d22ccd68a40201dc1bb9834efb7ed26ab49561 /chrome/browser/profiles/profile_manager.cc
parentd21a8a5fb4d3af19452149bdcf7f6855ba80a194 (diff)
downloadchromium_src-f8b2ca3555497caedc341ec16f110e310c15562d.zip
chromium_src-f8b2ca3555497caedc341ec16f110e310c15562d.tar.gz
chromium_src-f8b2ca3555497caedc341ec16f110e310c15562d.tar.bz2
Add Windows desktop shortcut for multiple profiles.
BUG=87770 TEST=new unit tests added with this CL. Review URL: http://codereview.chromium.org/8502033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111156 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/profiles/profile_manager.cc')
-rw-r--r--chrome/browser/profiles/profile_manager.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profiles/profile_manager.cc
index 26d38b6..6836041 100644
--- a/chrome/browser/profiles/profile_manager.cc
+++ b/chrome/browser/profiles/profile_manager.cc
@@ -213,6 +213,9 @@ ProfileManager::ProfileManager(const FilePath& user_data_dir)
ProfileManager::~ProfileManager() {
BrowserList::RemoveObserver(this);
+#if defined(OS_WIN)
+ profile_info_cache_->RemoveObserver(profile_shortcut_manager_.get());
+#endif
}
FilePath ProfileManager::GetDefaultProfileDir(
@@ -589,6 +592,10 @@ ProfileInfoCache& ProfileManager::GetProfileInfoCache() {
if (!profile_info_cache_.get()) {
profile_info_cache_.reset(new ProfileInfoCache(
g_browser_process->local_state(), user_data_dir_));
+#if defined(OS_WIN)
+ profile_shortcut_manager_.reset(new ProfileShortcutManagerWin());
+ profile_info_cache_->AddObserver(profile_shortcut_manager_.get());
+#endif
}
return *profile_info_cache_.get();
}
@@ -699,3 +706,9 @@ void ProfileManager::RegisterTestingProfile(Profile* profile,
if (add_to_cache)
AddProfileToCache(profile);
}
+
+#if defined(OS_WIN)
+void ProfileManager::RemoveProfileShortcutManagerForTesting() {
+ profile_info_cache_->RemoveObserver(profile_shortcut_manager_.get());
+}
+#endif