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

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

Issue 1270663002: Validate the Origin HTTP header in the browser process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 4 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 83068f1707d348cfebf244e221b60561366762f4..9b4cbd1157e362fec1e311a5f5f7fb80ba00798d 100644
--- a/content/public/browser/browser_message_filter.cc
+++ b/content/public/browser/browser_message_filter.cc
@@ -17,6 +17,10 @@
#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 {
@@ -184,8 +188,12 @@ void BrowserMessageFilter::ShutdownForBadMessage() {
BrowserChildProcessHostImpl::HistogramBadMessageTerminated(
PROCESS_TYPE_RENDERER);
- // TODO(nick): Shouldn't this call StopChildProcess on Android?
+#if defined(OS_ANDROID)
+ // Android requires a different approach for killing.
+ StopChildProcess(peer_process_.Handle());
Charlie Reis 2015/08/14 20:25:59 I discussed this with Nick. This is the approach
+#else
peer_process_.Terminate(content::RESULT_CODE_KILLED_BAD_MESSAGE, false);
+#endif
}
BrowserMessageFilter::~BrowserMessageFilter() {

Powered by Google App Engine
This is Rietveld 408576698