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

Unified Diff: chrome/installer/util/install_util.cc

Issue 11685006: [Fixit-Dec-2012] Auto-launch system-level Chrome post user-level Chrome self-destruction. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: +grt comments Created 7 years, 12 months 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
Index: chrome/installer/util/install_util.cc
diff --git a/chrome/installer/util/install_util.cc b/chrome/installer/util/install_util.cc
index d98a30b5037145aefa3fcc425c4044ab3cbb8e20..659ff54b83462b89aaedeaff96bb2fc77fcf2005 100644
--- a/chrome/installer/util/install_util.cc
+++ b/chrome/installer/util/install_util.cc
@@ -384,7 +384,15 @@ bool InstallUtil::GetSentinelFilePath(const FilePath::CharType* file,
return false;
if (IsPerUserInstall(exe_path.value().c_str())) {
- *path = exe_path;
+ // On user installs, the sentinel file path is by chrome.exe. DIR_EXE
+ // however is the directory of the current exe which could be another
+ // executable in the install hierarchy (e.g., setup.exe).
+ FilePath user_level_install_path(
grt (UTC plus 2) 2013/01/03 15:41:27 instead of requiring that the default install path
gab 2013/01/03 17:11:14 Fine, I was trying to avoid the assumption about b
+ installer::GetChromeInstallPath(false, dist));
+ if (user_level_install_path.IsParent(exe_path))
+ *path = user_level_install_path;
+ else
+ *path = exe_path;
} else {
std::vector<FilePath> user_data_dir_paths;
installer::GetChromeUserDataPaths(dist, &user_data_dir_paths);

Powered by Google App Engine
This is Rietveld 408576698