Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2109)

Unified Diff: chrome/browser/profiles/profile_manager.cc

Issue 8741023: Do not create shortcuts on Windows if the "no-first-run" switch is on. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: correct indentation Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile_manager.cc
===================================================================
--- chrome/browser/profiles/profile_manager.cc (revision 111737)
+++ chrome/browser/profiles/profile_manager.cc (working copy)
@@ -214,7 +214,9 @@
ProfileManager::~ProfileManager() {
BrowserList::RemoveObserver(this);
#if defined(OS_WIN)
- profile_info_cache_->RemoveObserver(profile_shortcut_manager_.get());
+ const CommandLine& command_line = *CommandLine::ForCurrentProcess();
+ if (!command_line.HasSwitch(switches::kNoFirstRun))
robertshield 2011/11/30 20:07:48 I would replace the condition with if (profile_sh
Miranda Callahan 2011/11/30 20:18:24 Indeed! Fixed.
+ profile_info_cache_->RemoveObserver(profile_shortcut_manager_.get());
#endif
}
@@ -593,8 +595,11 @@
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());
+ const CommandLine& command_line = *CommandLine::ForCurrentProcess();
+ if (!command_line.HasSwitch(switches::kNoFirstRun)) {
+ profile_shortcut_manager_.reset(new ProfileShortcutManagerWin());
+ profile_info_cache_->AddObserver(profile_shortcut_manager_.get());
+ }
#endif
}
return *profile_info_cache_.get();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698