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

Unified Diff: content/test/render_thread_impl_browser_test_ipc_helper.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/public/browser/browser_child_process_host.h ('k') | mojo/edk/embedder/embedder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/render_thread_impl_browser_test_ipc_helper.cc
diff --git a/content/test/render_thread_impl_browser_test_ipc_helper.cc b/content/test/render_thread_impl_browser_test_ipc_helper.cc
index 52cb151042f57073b3fc1cc8f3cd4a050207f14f..8c924d040991c66f0f058a6c5aa29cd68e3cf4bb 100644
--- a/content/test/render_thread_impl_browser_test_ipc_helper.cc
+++ b/content/test/render_thread_impl_browser_test_ipc_helper.cc
@@ -38,8 +38,9 @@ void RenderThreadImplBrowserIPCTestHelper::SetupIpcThread() {
void RenderThreadImplBrowserIPCTestHelper::SetupMojo() {
InitializeMojo();
+ std::string child_token = mojo::edk::GenerateRandomToken();
ipc_support_.reset(new IPC::ScopedIPCSupport(ipc_thread_->task_runner()));
- mojo_application_host_.reset(new MojoApplicationHost());
+ mojo_application_host_.reset(new MojoApplicationHost(child_token));
mojo_application_token_ = mojo_application_host_->GetToken();
mojo_ipc_token_ = mojo::edk::GenerateRandomToken();
@@ -47,7 +48,7 @@ void RenderThreadImplBrowserIPCTestHelper::SetupMojo() {
mojo::MessagePipe pipe;
channel_ = IPC::ChannelProxy::Create(
IPC::ChannelMojo::CreateServerFactory(
- mojo::edk::CreateParentMessagePipe(mojo_ipc_token_)),
+ mojo::edk::CreateParentMessagePipe(mojo_ipc_token_, child_token)),
dummy_listener_.get(), ipc_thread_->task_runner());
}
« no previous file with comments | « content/public/browser/browser_child_process_host.h ('k') | mojo/edk/embedder/embedder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698