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

Unified Diff: content/browser/gpu/gpu_process_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: revert stuff. Created 4 years, 7 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/browser/gpu/gpu_process_host.cc
diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc
index 11055c9e055a9c02152a09908e9d4cfdd3f940b4..34cf8973ab144e3396fd8bd65c93660fa5ecc06b 100644
--- a/content/browser/gpu/gpu_process_host.cc
+++ b/content/browser/gpu/gpu_process_host.cc
@@ -52,6 +52,7 @@
#include "ipc/ipc_switches.h"
#include "ipc/message_filter.h"
#include "media/base/media_switches.h"
+#include "mojo/edk/embedder/embedder.h"
#include "ui/base/ui_base_switches.h"
#include "ui/events/latency_info.h"
#include "ui/gl/gl_switches.h"
@@ -407,7 +408,8 @@ GpuProcessHost::GpuProcessHost(int host_id, GpuProcessKind kind)
kind_(kind),
process_launched_(false),
initialized_(false),
- uma_memory_stats_received_(false) {
+ uma_memory_stats_received_(false),
+ child_token_(mojo::edk::GenerateRandomToken()) {
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kSingleProcess) ||
base::CommandLine::ForCurrentProcess()->HasSwitch(
@@ -431,7 +433,8 @@ GpuProcessHost::GpuProcessHost(int host_id, GpuProcessKind kind)
FROM_HERE,
base::Bind(base::IgnoreResult(&GpuProcessHostUIShim::Create), host_id));
- process_.reset(new BrowserChildProcessHostImpl(PROCESS_TYPE_GPU, this));
+ process_.reset(new BrowserChildProcessHostImpl(PROCESS_TYPE_GPU, this,
+ child_token_));
}
GpuProcessHost::~GpuProcessHost() {
@@ -544,7 +547,7 @@ bool GpuProcessHost::Init() {
return false;
DCHECK(!mojo_application_host_);
- mojo_application_host_.reset(new MojoApplicationHost);
+ mojo_application_host_.reset(new MojoApplicationHost(child_token_));
gpu::GpuPreferences gpu_preferences = GetGpuPreferencesFromCommandLine();
if (in_process_) {

Powered by Google App Engine
This is Rietveld 408576698