4261434: Remove browser_watcher (1/3): Move ExitCodeWatcher to chrome/app

https://chromium-review.googlesource.com/c/chromium/src/+/4261434
This commit is contained in:
Jeremy Rose
2023-02-23 14:36:30 -08:00
parent 46f3193d1f
commit edc90d9488
2 changed files with 4 additions and 5 deletions

View File

@@ -1277,7 +1277,7 @@ if (is_mac) {
]
deps += [
"//components/browser_watcher:browser_watcher_client",
"//chrome/app:exit_code_watcher",
"//components/crash/core/app:run_as_crashpad_handler",
]

View File

@@ -23,7 +23,7 @@
#include "base/strings/utf_string_conversions.h"
#include "base/win/dark_mode_support.h"
#include "base/win/windows_version.h"
#include "components/browser_watcher/exit_code_watcher_win.h"
#include "chrome/app/exit_code_watcher_win.h"
#include "components/crash/core/app/crash_switches.h"
#include "components/crash/core/app/run_as_crashpad_handler_win.h"
#include "content/public/app/content_main.h"
@@ -183,7 +183,7 @@ int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE, wchar_t* cmd, int) {
if (process_type == crash_reporter::switches::kCrashpadHandler) {
// Check if we should monitor the exit code of this process
std::unique_ptr<browser_watcher::ExitCodeWatcher> exit_code_watcher;
std::unique_ptr<ExitCodeWatcher> exit_code_watcher;
// Retrieve the client process from the command line
crashpad::InitialClientData initial_client_data;
@@ -196,8 +196,7 @@ int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE, wchar_t* cmd, int) {
::GetCurrentProcess(), &duplicate_handle,
PROCESS_QUERY_INFORMATION, FALSE, DUPLICATE_SAME_ACCESS)) {
base::Process parent_process(duplicate_handle);
exit_code_watcher =
std::make_unique<browser_watcher::ExitCodeWatcher>();
exit_code_watcher = std::make_unique<ExitCodeWatcher>();
if (exit_code_watcher->Initialize(std::move(parent_process))) {
exit_code_watcher->StartWatching();
}