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

Unified Diff: content/browser/browser_child_process_host_impl.cc

Issue 2019973002: [mojo-edk] Bind a child token to child launches and port reservations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 6 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 | « content/browser/browser_child_process_host_impl.h ('k') | content/browser/child_process_launcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/browser_child_process_host_impl.cc
diff --git a/content/browser/browser_child_process_host_impl.cc b/content/browser/browser_child_process_host_impl.cc
index 07754af1eb085c98d64c99351c6743e1a67e00a1..23f4c05c188a419299b921f272fb2a03e42042ab 100644
--- a/content/browser/browser_child_process_host_impl.cc
+++ b/content/browser/browser_child_process_host_impl.cc
@@ -82,7 +82,16 @@ void NotifyProcessKilled(const ChildProcessData& data, int exit_code) {
BrowserChildProcessHost* BrowserChildProcessHost::Create(
content::ProcessType process_type,
BrowserChildProcessHostDelegate* delegate) {
- return new BrowserChildProcessHostImpl(process_type, delegate);
+ return new BrowserChildProcessHostImpl(
+ process_type, delegate, mojo::edk::GenerateRandomToken());
+}
+
+BrowserChildProcessHost* BrowserChildProcessHost::Create(
+ content::ProcessType process_type,
+ BrowserChildProcessHostDelegate* delegate,
+ const std::string& mojo_child_token) {
+ return new BrowserChildProcessHostImpl(
+ process_type, delegate, mojo_child_token);
}
BrowserChildProcessHost* BrowserChildProcessHost::FromID(int child_process_id) {
@@ -124,9 +133,11 @@ void BrowserChildProcessHostImpl::RemoveObserver(
BrowserChildProcessHostImpl::BrowserChildProcessHostImpl(
content::ProcessType process_type,
- BrowserChildProcessHostDelegate* delegate)
+ BrowserChildProcessHostDelegate* delegate,
+ const std::string& mojo_child_token)
: data_(process_type),
delegate_(delegate),
+ mojo_child_token_(mojo_child_token),
power_monitor_message_broadcaster_(this),
is_channel_connected_(false),
notify_child_disconnected_(false) {
@@ -229,6 +240,7 @@ void BrowserChildProcessHostImpl::Launch(
cmd_line,
data_.id,
this,
+ mojo_child_token_,
terminate_on_shutdown));
}
« no previous file with comments | « content/browser/browser_child_process_host_impl.h ('k') | content/browser/child_process_launcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698