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

Unified Diff: chrome/browser/process_singleton_win.cc

Issue 970943003: Remove base::KillProcessById (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 10 months 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/kill_win.cc ('k') | net/tools/stress_cache/stress_cache.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/process_singleton_win.cc
diff --git a/chrome/browser/process_singleton_win.cc b/chrome/browser/process_singleton_win.cc
index 63a0c48fe990fecb472cd33787b2ab50ef3c8209..439dfb23ecdda48e4e696c280966c1d39bbeea5a 100644
--- a/chrome/browser/process_singleton_win.cc
+++ b/chrome/browser/process_singleton_win.cc
@@ -11,6 +11,7 @@
#include "base/command_line.h"
#include "base/files/file_path.h"
#include "base/process/kill.h"
+#include "base/process/process.h"
#include "base/process/process_info.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/stringprintf.h"
@@ -266,6 +267,7 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcess() {
remote_window_ = NULL;
return PROCESS_NONE;
}
+ base::Process process = base::Process::Open(process_id);
// The window is hung. Scan for every window to find a visible one.
bool visible_window = false;
@@ -285,7 +287,7 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcess() {
}
// Time to take action. Kill the browser process.
- base::KillProcessById(process_id, content::RESULT_CODE_HUNG, true);
+ base::KillProcess(process.Handle(), content::RESULT_CODE_HUNG, true);
remote_window_ = NULL;
return PROCESS_NONE;
}
« no previous file with comments | « base/process/kill_win.cc ('k') | net/tools/stress_cache/stress_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698