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

Unified Diff: content/browser/utility_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/utility_process_host_impl.h ('k') | content/public/browser/browser_child_process_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/utility_process_host_impl.cc
diff --git a/content/browser/utility_process_host_impl.cc b/content/browser/utility_process_host_impl.cc
index 4a05b3f21d7fbaaac3276d72db1f27ccf2c21c72..04dcd920b587022034389604f121c96a538538d0 100644
--- a/content/browser/utility_process_host_impl.cc
+++ b/content/browser/utility_process_host_impl.cc
@@ -36,6 +36,7 @@
#include "content/public/common/sandbox_type.h"
#include "content/public/common/sandboxed_process_launcher_delegate.h"
#include "ipc/ipc_switches.h"
+#include "mojo/edk/embedder/embedder.h"
#include "ui/base/ui_base_switches.h"
#if defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX)
@@ -158,7 +159,8 @@ UtilityProcessHostImpl::UtilityProcessHostImpl(
#endif
started_(false),
name_(base::ASCIIToUTF16("utility process")),
- mojo_application_host_(new MojoApplicationHost),
+ child_token_(mojo::edk::GenerateRandomToken()),
+ mojo_application_host_(new MojoApplicationHost(child_token_)),
weak_ptr_factory_(this) {
}
@@ -250,7 +252,8 @@ bool UtilityProcessHostImpl::StartProcess() {
// Name must be set or metrics_service will crash in any test which
// launches a UtilityProcessHost.
- process_.reset(new BrowserChildProcessHostImpl(PROCESS_TYPE_UTILITY, this));
+ process_.reset(new BrowserChildProcessHostImpl(PROCESS_TYPE_UTILITY, this,
+ child_token_));
process_->SetName(name_);
std::string channel_id = process_->GetHost()->CreateChannel();
« no previous file with comments | « content/browser/utility_process_host_impl.h ('k') | content/public/browser/browser_child_process_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698