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

Unified Diff: components/browser_watcher/exit_code_watcher_win.cc

Issue 811603003: Add a console control handler chrome_watcher.dll. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@base_process
Patch Set: Address Greg's nits. Created 6 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: components/browser_watcher/exit_code_watcher_win.cc
diff --git a/components/browser_watcher/exit_code_watcher_win.cc b/components/browser_watcher/exit_code_watcher_win.cc
index c3fbd9f64e764cfed1b593cd020291591b87aa01..0c9e7df7af0ddc03c7b8d997784168e7b0621221 100644
--- a/components/browser_watcher/exit_code_watcher_win.cc
+++ b/components/browser_watcher/exit_code_watcher_win.cc
@@ -27,7 +27,7 @@ base::string16 GetValueName(const base::Time creation_time,
const char ExitCodeWatcher::kParenthHandleSwitch[] = "parent-handle";
ExitCodeWatcher::ExitCodeWatcher(const base::char16* registry_path) :
- registry_path_(registry_path) {
+ registry_path_(registry_path), exit_code_(STILL_ACTIVE) {
}
ExitCodeWatcher::~ExitCodeWatcher() {
@@ -72,13 +72,12 @@ bool ExitCodeWatcher::ParseArguments(const base::CommandLine& cmd_line) {
}
void ExitCodeWatcher::WaitForExit() {
- int exit_code = 0;
- if (!process_.WaitForExit(&exit_code)) {
+ if (!process_.WaitForExit(&exit_code_)) {
LOG(ERROR) << "Failed to wait for process.";
return;
}
- WriteProcessExitCode(exit_code);
+ WriteProcessExitCode(exit_code_);
}
bool ExitCodeWatcher::WriteProcessExitCode(int exit_code) {
« no previous file with comments | « components/browser_watcher/exit_code_watcher_win.h ('k') | components/browser_watcher/exit_code_watcher_win_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698