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

Unified Diff: components/arc/arc_bridge_bootstrap.cc

Issue 1641353003: GpuArcVideoService (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@arc-4-owen-ArcGpuVideoDecodeAccelerator
Patch Set: fix build Created 4 years, 8 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 | « components/arc/BUILD.gn ('k') | components/arc/common/video.mojom » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/arc/arc_bridge_bootstrap.cc
diff --git a/components/arc/arc_bridge_bootstrap.cc b/components/arc/arc_bridge_bootstrap.cc
index c9e44a1313f46546cdaf9e2a15b2615437cbaea0..b28805171f66531f093242a7b08338d75a10b5a8 100644
--- a/components/arc/arc_bridge_bootstrap.cc
+++ b/components/arc/arc_bridge_bootstrap.cc
@@ -34,16 +34,6 @@ namespace arc {
namespace {
-// We do not know the PID of ARC, since Chrome does not create it directly.
-// Since Mojo in POSIX does not use the child PID except as an unique
-// identifier for the routing table, rather than doing a lot of plumbing in the
-// whole system to get the correct PID, just use an arbitrary number that will
-// never be used by a legitimate process. Chrome OS assigns unassigned PIDs
-// sequentially until it reaches a certain maximum value (Chrome OS uses the
-// default value of 32k), at which point it loops around to zero. An arbitrary
-// number larger than the maximum should be safe.
-const pid_t kArcPid = 0x3DE0EA7C;
-
const base::FilePath::CharType kArcBridgeSocketPath[] =
FILE_PATH_LITERAL("/var/run/chrome/arc_bridge.sock");
@@ -260,8 +250,10 @@ base::ScopedFD ArcBridgeBootstrapImpl::AcceptInstanceConnection(
}
base::ScopedFD scoped_fd(raw_fd);
+ // Hardcode pid 0 since it is unused in mojo.
+ const base::ProcessHandle kUnusedChildProcessHandle = 0;
mojo::edk::ScopedPlatformHandle child_handle =
- mojo::edk::ChildProcessLaunched(kArcPid);
+ mojo::edk::ChildProcessLaunched(kUnusedChildProcessHandle);
mojo::edk::ScopedPlatformHandleVectorPtr handles(
new mojo::edk::PlatformHandleVector{child_handle.release()});
« no previous file with comments | « components/arc/BUILD.gn ('k') | components/arc/common/video.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698