| Index: chrome/browser/profiles/profile_manager.cc
|
| ===================================================================
|
| --- chrome/browser/profiles/profile_manager.cc (revision 118125)
|
| +++ chrome/browser/profiles/profile_manager.cc (working copy)
|
| @@ -551,6 +551,9 @@
|
| InitProfileUserPrefs(profile);
|
| AddProfileToCache(profile);
|
| DoFinalInitLogging(profile);
|
| +#if defined(OS_WIN)
|
| + CreateDesktopShortcut(profile);
|
| +#endif
|
| }
|
|
|
| void ProfileManager::DoFinalInitForServices(Profile* profile,
|
| @@ -714,6 +717,25 @@
|
| icon_index);
|
| }
|
|
|
| +#if defined(OS_WIN)
|
| +void ProfileManager::CreateDesktopShortcut(Profile* profile) {
|
| + // Some distributions can not create desktop shortcuts, in which case
|
| + // profile_shortcut_manager_ will not be set.
|
| + if (!profile_shortcut_manager_.get())
|
| + return;
|
| +
|
| + bool shortcut_created =
|
| + profile->GetPrefs()->GetBoolean(prefs::kProfileShortcutCreated);
|
| + if (!shortcut_created && GetNumberOfProfiles() > 1) {
|
| + profile_shortcut_manager_->AddProfileShortcut(profile->GetPath());
|
| +
|
| + // We only ever create the shortcut for a profile once, so set a pref
|
| + // reminding us to skip this in the future.
|
| + profile->GetPrefs()->SetBoolean(prefs::kProfileShortcutCreated, true);
|
| + }
|
| +}
|
| +#endif
|
| +
|
| void ProfileManager::InitProfileUserPrefs(Profile* profile) {
|
| ProfileInfoCache& cache = GetProfileInfoCache();
|
|
|
|
|