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

Unified Diff: base/process/process_win.cc

Issue 812543002: Update from https://crrev.com/308331 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: 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
« no previous file with comments | « base/process/process_unittest.cc ('k') | base/profiler/tracked_time.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/process/process_win.cc
diff --git a/base/process/process_win.cc b/base/process/process_win.cc
index 3e0d79fa8d39dc769f79eb241efaafeee397bb0c..96556a9b1ee2f1a6b5202d628d89c96950d0029d 100644
--- a/base/process/process_win.cc
+++ b/base/process/process_win.cc
@@ -6,6 +6,7 @@
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
+#include "base/process/kill.h"
#include "base/win/windows_version.h"
namespace base {
@@ -110,6 +111,18 @@ void Process::Terminate(int result_code) {
terminate_process(Handle(), result_code);
}
+bool Process::WaitForExit(int* exit_code) {
+ return WaitForExitWithTimeout(TimeDelta::FromMilliseconds(INFINITE),
+ exit_code);
+}
+
+bool Process::WaitForExitWithTimeout(TimeDelta timeout, int* exit_code) {
+ // TODO(rvargas) crbug.com/417532: Move the implementation here.
+ if (timeout > TimeDelta::FromMilliseconds(INFINITE))
+ timeout = TimeDelta::FromMilliseconds(INFINITE);
+ return base::WaitForExitCodeWithTimeout(Handle(), exit_code, timeout);
+}
+
bool Process::IsProcessBackgrounded() const {
DCHECK(IsValid());
DWORD priority = GetPriority();
« no previous file with comments | « base/process/process_unittest.cc ('k') | base/profiler/tracked_time.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698