Commit 5e143e8e authored by mirandac@chromium.org's avatar mirandac@chromium.org

Do not create shortcuts on Windows if the "no-first-run" switch is on.

BUG=105882
TEST=see bug.

Review URL: http://codereview.chromium.org/8741023

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112355 0039d316-1c4b-4281-b951-d872f2087c98
parent d482596c
...@@ -214,7 +214,8 @@ ProfileManager::ProfileManager(const FilePath& user_data_dir) ...@@ -214,7 +214,8 @@ ProfileManager::ProfileManager(const FilePath& user_data_dir)
ProfileManager::~ProfileManager() { ProfileManager::~ProfileManager() {
BrowserList::RemoveObserver(this); BrowserList::RemoveObserver(this);
#if defined(OS_WIN) #if defined(OS_WIN)
profile_info_cache_->RemoveObserver(profile_shortcut_manager_.get()); if (profile_shortcut_manager_.get())
profile_info_cache_->RemoveObserver(profile_shortcut_manager_.get());
#endif #endif
} }
...@@ -593,8 +594,11 @@ ProfileInfoCache& ProfileManager::GetProfileInfoCache() { ...@@ -593,8 +594,11 @@ ProfileInfoCache& ProfileManager::GetProfileInfoCache() {
profile_info_cache_.reset(new ProfileInfoCache( profile_info_cache_.reset(new ProfileInfoCache(
g_browser_process->local_state(), user_data_dir_)); g_browser_process->local_state(), user_data_dir_));
#if defined(OS_WIN) #if defined(OS_WIN)
profile_shortcut_manager_.reset(new ProfileShortcutManagerWin()); const CommandLine& command_line = *CommandLine::ForCurrentProcess();
profile_info_cache_->AddObserver(profile_shortcut_manager_.get()); if (!command_line.HasSwitch(switches::kNoFirstRun)) {
profile_shortcut_manager_.reset(new ProfileShortcutManagerWin());
profile_info_cache_->AddObserver(profile_shortcut_manager_.get());
}
#endif #endif
} }
return *profile_info_cache_.get(); return *profile_info_cache_.get();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment