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

Unified Diff: chrome/browser/chromeos/arc/gpu_arc_video_service_host.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 | « no previous file | chrome/test/base/mojo_test_connector.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/arc/gpu_arc_video_service_host.cc
diff --git a/chrome/browser/chromeos/arc/gpu_arc_video_service_host.cc b/chrome/browser/chromeos/arc/gpu_arc_video_service_host.cc
index 2588717d0b53242cf70b820ec7de6505a1eeee7d..940ecf624f099aac5a5c6d1a7b56ea37e18592fb 100644
--- a/chrome/browser/chromeos/arc/gpu_arc_video_service_host.cc
+++ b/chrome/browser/chromeos/arc/gpu_arc_video_service_host.cc
@@ -60,8 +60,9 @@ void GpuArcVideoServiceHost::OnRequestArcVideoAcceleratorChannel(
const base::ProcessHandle kUnusedChildProcessHandle =
base::kNullProcessHandle;
mojo::edk::PlatformChannelPair channel_pair;
+ std::string child_token = mojo::edk::GenerateRandomToken();
mojo::edk::ChildProcessLaunched(kUnusedChildProcessHandle,
- channel_pair.PassServerHandle());
+ channel_pair.PassServerHandle(), child_token);
MojoHandle wrapped_handle;
MojoResult wrap_result = mojo::edk::CreatePlatformHandleWrapper(
@@ -75,7 +76,7 @@ void GpuArcVideoServiceHost::OnRequestArcVideoAcceleratorChannel(
std::string token = mojo::edk::GenerateRandomToken();
mojo::ScopedMessagePipeHandle server_pipe =
- mojo::edk::CreateParentMessagePipe(token);
+ mojo::edk::CreateParentMessagePipe(token, child_token);
if (!server_pipe.is_valid()) {
LOG(ERROR) << "Invalid pipe";
callback.Run(mojo::ScopedHandle(), std::string());
« no previous file with comments | « no previous file | chrome/test/base/mojo_test_connector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698