| Index: chrome/browser/plugins/plugin_observer.cc
|
| diff --git a/chrome/browser/plugins/plugin_observer.cc b/chrome/browser/plugins/plugin_observer.cc
|
| index b4d472e143737d59d7d9a53654d16e0a95701769..dfd0577432c97e4d78876ee5a6081bce51e39ad8 100644
|
| --- a/chrome/browser/plugins/plugin_observer.cc
|
| +++ b/chrome/browser/plugins/plugin_observer.cc
|
| @@ -294,14 +294,15 @@ void PluginObserver::PluginCrashed(const base::FilePath& plugin_path,
|
| // process died, |plugin_pid| has been reused by a new process. The
|
| // consequence is that we will display |IDS_PLUGIN_DISCONNECTED_PROMPT| rather
|
| // than |IDS_PLUGIN_CRASHED_PROMPT| to the user, which seems acceptable.
|
| - base::ProcessHandle plugin_handle = base::kNullProcessHandle;
|
| - bool open_result = base::OpenProcessHandleWithAccess(
|
| - plugin_pid, PROCESS_QUERY_INFORMATION | SYNCHRONIZE, &plugin_handle);
|
| + base::Process plugin_process =
|
| + base::Process::OpenWithAccess(plugin_pid,
|
| + PROCESS_QUERY_INFORMATION | SYNCHRONIZE);
|
| bool is_running = false;
|
| - if (open_result) {
|
| - is_running = base::GetTerminationStatus(plugin_handle, NULL) ==
|
| - base::TERMINATION_STATUS_STILL_RUNNING;
|
| - base::CloseProcessHandle(plugin_handle);
|
| + if (plugin_process.IsValid()) {
|
| + is_running =
|
| + base::GetTerminationStatus(plugin_process.Handle(), NULL) ==
|
| + base::TERMINATION_STATUS_STILL_RUNNING;
|
| + plugin_process.Close();
|
| }
|
|
|
| if (is_running) {
|
|
|