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

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

Issue 1481703002: win: Move Crashpad all into chrome.exe (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: breakpad_dump_location, revert test change Created 5 years 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 b5ff91cf3aaba8fb754753d613c26b1899e8fa45..2d821972516c305ebf3e3f2cffee927c647a7e55 100644
--- a/chrome/installer/util/install_util.cc
+++ b/chrome/installer/util/install_util.cc
@@ -13,6 +13,7 @@
#include <algorithm>
+#include "base/base_paths_win.h"
#include "base/command_line.h"
#include "base/environment.h"
#include "base/files/file_util.h"
@@ -385,15 +386,17 @@ bool InstallUtil::IsPerUserInstall(const base::FilePath& exe_path) {
program_files_path =
base::FilePath(base::UTF8ToWide(env_program_files_path));
} else {
- const int kProgramFilesKey =
+ // We don't use PathService here so this can be used early in startup.
+ // See http://crbug.com/564398.
+ bool result =
#if defined(_WIN64)
- // TODO(wfh): Revise this when Chrome is/can be installed in the 64-bit
- // program files directory.
- base::DIR_PROGRAM_FILESX86;
+ // TODO(wfh): Revise this when Chrome is/can be installed in the 64-bit
+ // program files directory.
+ GetProgramFilesX86(&program_files_path);
#else
- base::DIR_PROGRAM_FILES;
+ GetProgramFiles(&program_files_path);
#endif
- if (!PathService::Get(kProgramFilesKey, &program_files_path)) {
+ if (!result) {
NOTREACHED();
return true;
}
@@ -428,8 +431,11 @@ bool CheckIsChromeSxSProcess() {
return true;
// Also return true if we are running from Chrome SxS installed path.
- base::FilePath exe_dir;
- PathService::Get(base::DIR_EXE, &exe_dir);
+ // We don't use PathService here so that this can be used very early in
+ // startup. See http://crbug.com/564398.
+ base::FilePath exe_file;
+ DCHECK(GetFileExe(&exe_file));
+ base::FilePath exe_dir = exe_file.DirName();
base::string16 chrome_sxs_dir(installer::kGoogleChromeInstallSubDir2);
chrome_sxs_dir.append(installer::kSxSSuffix);

Powered by Google App Engine
This is Rietveld 408576698