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

Unified Diff: content/public/browser/browser_message_filter.cc

Issue 2594203004: Unifying ChildProcessLauncher across platforms. (Closed)
Patch Set: Clean-up. Created 3 years, 11 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
Index: content/public/browser/browser_message_filter.cc
diff --git a/content/public/browser/browser_message_filter.cc b/content/public/browser/browser_message_filter.cc
index 4fcbe313b5b242a63e0e27e4c63edc886dc37e17..a6521d305acc039a647ea326dee971f41374fdde 100644
--- a/content/public/browser/browser_message_filter.cc
+++ b/content/public/browser/browser_message_filter.cc
@@ -14,16 +14,13 @@
#include "base/task_runner.h"
#include "build/build_config.h"
#include "content/browser/browser_child_process_host_impl.h"
+#include "content/browser/child_process_launcher.h"
#include "content/public/browser/user_metrics.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/result_codes.h"
#include "ipc/ipc_sync_message.h"
#include "ipc/message_filter.h"
-#if defined(OS_ANDROID)
-#include "content/browser/android/child_process_launcher_android.h"
-#endif
-
using content::BrowserMessageFilter;
namespace content {
@@ -164,12 +161,8 @@ void BrowserMessageFilter::ShutdownForBadMessage() {
if (command_line->HasSwitch(switches::kDisableKillAfterBadIPC))
return;
-#if defined(OS_ANDROID)
- // Android requires a different approach for killing.
- StopChildProcess(peer_process_.Handle());
-#else
- peer_process_.Terminate(content::RESULT_CODE_KILLED_BAD_MESSAGE, false);
-#endif
+ ChildProcessLauncher::TerminateProcess(
+ peer_process_, content::RESULT_CODE_KILLED_BAD_MESSAGE, false);
// Report a crash, since none will be generated by the killed renderer.
base::debug::DumpWithoutCrashing();
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.cc ('k') | content/public/browser/file_descriptor_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698