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

Unified Diff: chrome/browser/chrome_browser_main.cc

Issue 11420045: Launch system-level Active Setup immediately following self-destruction of a user-level Chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comment Created 8 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 | chrome/installer/setup/uninstall.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_browser_main.cc
diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc
index 97f5425907a9ac0ec6cbc14d74b659d3fd0d64c6..98775e264b732ad0769cc41183049c7ef3da70ed 100644
--- a/chrome/browser/chrome_browser_main.cc
+++ b/chrome/browser/chrome_browser_main.cc
@@ -1197,19 +1197,23 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
// touches reads preferences.
if (is_first_run_) {
#if defined(OS_WIN)
- // On Windows, trigger the Active Setup command in some scenarios to finish
- // configuring this user's install (e.g. per-user shortcuts on system-level
- // installs).
+ // On Windows, trigger the Active Setup command for system-level Chromes to
+ // finish configuring this user's install (e.g. per-user shortcuts).
// Delay the task slightly to give Chrome launch I/O priority while also
// making sure shortcuts are created promptly to avoid annoying the user by
// re-creating shortcuts he previously deleted.
// TODO(gab): Add a first run section to ChromeBrowserMainParts and remove
// OS specific sections below.
static const int64 kTiggerActiveSetupDelaySeconds = 5;
- BrowserThread::GetBlockingPool()->PostDelayedTask(
- FROM_HERE,
- base::Bind(&InstallUtil::TriggerActiveSetupCommandIfNeeded),
- base::TimeDelta::FromSeconds(kTiggerActiveSetupDelaySeconds));
+ FilePath chrome_exe;
+ if (!PathService::Get(base::FILE_EXE, &chrome_exe)) {
+ NOTREACHED();
+ } else if (!InstallUtil::IsPerUserInstall(chrome_exe.value().c_str())) {
+ BrowserThread::GetBlockingPool()->PostDelayedTask(
+ FROM_HERE,
+ base::Bind(&InstallUtil::TriggerActiveSetupCommand),
+ base::TimeDelta::FromSeconds(kTiggerActiveSetupDelaySeconds));
+ }
#endif // OS_WIN
if (!first_run_ui_bypass_) {
first_run::AutoImport(profile_,
« no previous file with comments | « no previous file | chrome/installer/setup/uninstall.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698