Chromium Code Reviews| 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..ce97417cd034f21fe8c5e2cb79081839afb7382e 100644 |
| --- a/chrome/installer/util/install_util.cc |
| +++ b/chrome/installer/util/install_util.cc |
| @@ -384,7 +384,22 @@ bool InstallUtil::GetSentinelFilePath(const FilePath::CharType* file, |
| return false; |
| if (IsPerUserInstall(exe_path.value().c_str())) { |
| - *path = exe_path; |
| + const FilePath maybe_product_dir(exe_path.DirName().DirName()); |
| + if (file_util::PathExists(exe_path.Append(installer::kChromeExe))) { |
| + // DIR_EXE is most likely Chrome's directory in which case |exe_path| is |
| + // the user-level sentinel path. |
| + *path = exe_path; |
| + } else if (file_util::PathExists( |
| + maybe_product_dir.Append(installer::kChromeExe))) { |
|
grt (UTC plus 2)
2013/01/03 17:48:58
nit: 4-space indent relative to file_util above
gab
2013/01/03 18:39:49
Done.
|
| + // DIR_EXE can also be the Installer directory if this is called from a |
| + // setup.exe running from Application\<version>\Installer (see |
| + // InstallerState::GetInstallerDirectory) in which case Chrome's directory |
| + // is two levels down. |
|
grt (UTC plus 2)
2013/01/03 17:48:58
down -> up?
gab
2013/01/03 18:39:49
Done.
|
| + *path = maybe_product_dir; |
| + } else { |
| + NOTREACHED(); |
| + return false; |
| + } |
| } else { |
| std::vector<FilePath> user_data_dir_paths; |
| installer::GetChromeUserDataPaths(dist, &user_data_dir_paths); |