Index: chrome/installer/util/install_util.cc |
diff --git a/chrome/installer/util/install_util.cc b/chrome/installer/util/install_util.cc |
index 6b327f8e29378b2e05ae102b5d49c9baa01cd3b5..0c1dd99c9315b6989bdb3b4e610eeb0504440252 100644 |
--- a/chrome/installer/util/install_util.cc |
+++ b/chrome/installer/util/install_util.cc |
@@ -26,6 +26,7 @@ |
#include "base/win/windows_version.h" |
#include "chrome/installer/util/browser_distribution.h" |
#include "chrome/installer/util/google_update_constants.h" |
+#include "chrome/installer/util/helper.h" |
#include "chrome/installer/util/l10n_string_util.h" |
#include "chrome/installer/util/installation_state.h" |
#include "chrome/installer/util/util_constants.h" |
@@ -358,6 +359,29 @@ bool InstallUtil::HasDelegateExecuteHandler(BrowserDistribution* dist, |
return found; |
} |
+bool InstallUtil::GetSentinelFilePath(const char* file, |
+ BrowserDistribution* dist, |
+ FilePath* path) { |
+ FilePath exe_path; |
+ if (!PathService::Get(base::DIR_EXE, &exe_path)) |
+ return false; |
+ |
+ if (IsPerUserInstall(exe_path.value().c_str())) { |
+ *path = exe_path; |
+ } else { |
+ std::vector<FilePath> user_data_dir_paths; |
+ installer::GetChromeUserDataPaths(dist, &user_data_dir_paths); |
+ |
+ if (!user_data_dir_paths.empty()) |
+ *path = user_data_dir_paths[0]; |
+ else |
+ return false; |
+ } |
+ |
+ *path = path->AppendASCII(file); |
+ return true; |
+} |
+ |
// This method tries to delete a registry key and logs an error message |
// in case of failure. It returns true if deletion is successful (or the key did |
// not exist), otherwise false. |