diff options
author | pmonette <pmonette@chromium.org> | 2016-02-09 10:59:04 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-02-09 19:00:19 +0000 |
commit | e1fb6b8e4dcdc0b5e7cde84f90428fb0c719b468 (patch) | |
tree | 02fd02e6dc14ce14dcf26072e4f53c2557945566 /components/crash | |
parent | 3f81ff8cb127d7fd9526864dfd3454a2a86c48e0 (diff) | |
download | chromium_src-e1fb6b8e4dcdc0b5e7cde84f90428fb0c719b468.zip chromium_src-e1fb6b8e4dcdc0b5e7cde84f90428fb0c719b468.tar.gz chromium_src-e1fb6b8e4dcdc0b5e7cde84f90428fb0c719b468.tar.bz2 |
Don't hardcode executable name
Review URL: https://codereview.chromium.org/1677093002
Cr-Commit-Position: refs/heads/master@{#374427}
Diffstat (limited to 'components/crash')
-rw-r--r-- | components/crash/content/app/crashpad.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/components/crash/content/app/crashpad.cc b/components/crash/content/app/crashpad.cc index 38b54b1..8cb7d5b 100644 --- a/components/crash/content/app/crashpad.cc +++ b/components/crash/content/app/crashpad.cc @@ -16,11 +16,13 @@ #include <vector> #include "base/auto_reset.h" +#include "base/base_paths.h" #include "base/command_line.h" #include "base/debug/crash_logging.h" #include "base/debug/dump_without_crashing.h" #include "base/logging.h" #include "base/macros.h" +#include "base/path_service.h" #include "base/strings/string_number_conversions.h" #include "base/strings/string_piece.h" #include "base/strings/stringprintf.h" @@ -364,7 +366,12 @@ void ReadMainModuleAnnotationsForKasko( if (!process_handle.IsValid()) return; - HMODULE module = GetModuleInProcess(process_handle.Get(), L"chrome.exe"); + // The executable name is the same for the browser process and the crash + // reporter. + base::FilePath exe_path; + base::PathService::Get(base::FILE_EXE, &exe_path); + HMODULE module = GetModuleInProcess(process_handle.Get(), + exe_path.BaseName().value().c_str()); if (!module) return; |