summaryrefslogtreecommitdiffstats
path: root/chrome/app/client_util.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/app/client_util.cc')
-rw-r--r--chrome/app/client_util.cc15
1 files changed, 2 insertions, 13 deletions
diff --git a/chrome/app/client_util.cc b/chrome/app/client_util.cc
index 333a525..a8841cd 100644
--- a/chrome/app/client_util.cc
+++ b/chrome/app/client_util.cc
@@ -3,8 +3,7 @@
// found in the LICENSE file.
#include "chrome/app/client_util.h"
-
-#include <shlobj.h>
+#include "chrome/installer/util/install_util.h"
namespace client_util {
const wchar_t kProductVersionKey[] = L"pv";
@@ -17,7 +16,7 @@ bool FileExists(const wchar_t* const file_path) {
bool GetChromiumVersion(const wchar_t* const exe_path,
const wchar_t* const reg_key_path,
wchar_t** version) {
- HKEY reg_root = IsUserModeInstall(exe_path) ? HKEY_CURRENT_USER :
+ HKEY reg_root = InstallUtil::IsPerUserInstall(exe_path) ? HKEY_CURRENT_USER :
HKEY_LOCAL_MACHINE;
HKEY reg_key;
if (::RegOpenKeyEx(reg_root, reg_key_path, 0,
@@ -69,15 +68,5 @@ void GetExecutablePath(wchar_t* exe_path) {
}
}
-bool IsUserModeInstall(const wchar_t* const exe_path) {
- wchar_t buffer[MAX_PATH] = {0};
- if (!FAILED(SHGetFolderPath(NULL, CSIDL_PROGRAM_FILES, NULL,
- SHGFP_TYPE_CURRENT, buffer))) {
- if (exe_path == wcsstr(exe_path, buffer)) {
- return false;
- }
- }
- return true;
-}
} // namespace client_util