| Index: components/browser_watcher/watcher_metrics_provider_win.cc
|
| diff --git a/components/browser_watcher/watcher_metrics_provider_win.cc b/components/browser_watcher/watcher_metrics_provider_win.cc
|
| index 0848046ef79cc7559a5f950824966eb59447bd07..2798ae56c42d0fce3d9a17387b60cd78df1b33bc 100644
|
| --- a/components/browser_watcher/watcher_metrics_provider_win.cc
|
| +++ b/components/browser_watcher/watcher_metrics_provider_win.cc
|
| @@ -8,7 +8,7 @@
|
| #include <vector>
|
|
|
| #include "base/metrics/sparse_histogram.h"
|
| -#include "base/process/process_handle.h"
|
| +#include "base/process/process.h"
|
| #include "base/strings/string_number_conversions.h"
|
| #include "base/strings/string_piece.h"
|
| #include "base/strings/utf_string_conversions.h"
|
| @@ -51,10 +51,9 @@ bool IsDeadProcess(base::StringPiece16 key_or_value_name) {
|
| // This is more expensive than the above check, but should also be very rare,
|
| // as this only happens more than once for a given PID if a user is running
|
| // multiple Chrome instances concurrently.
|
| - base::ProcessHandle process = base::kNullProcessHandle;
|
| - if (base::OpenProcessHandle(static_cast<base::ProcessId>(pid), &process)) {
|
| - base::CloseProcessHandle(process);
|
| -
|
| + base::Process process =
|
| + base::Process::Open(static_cast<base::ProcessId>(pid));
|
| + if (process.IsValid()) {
|
| // The fact that it was possible to open the process says it's live.
|
| return false;
|
| }
|
|
|