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

Unified Diff: content/zygote/zygote_linux.cc

Issue 2025763002: Use ChannelMojo in Pepper and NaCl processes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mojo-utility-channel-mojo
Patch Set: iujbhirtughfbnjrthiubj 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/common/zygote_fork_delegate_linux.h ('k') | mojo/edk/system/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/zygote/zygote_linux.cc
diff --git a/content/zygote/zygote_linux.cc b/content/zygote/zygote_linux.cc
index 09828fb4421aefc5e5244262f7108996eb8d95e9..22f99a8eb36e279c7913b1ef2e359ded82922b01 100644
--- a/content/zygote/zygote_linux.cc
+++ b/content/zygote/zygote_linux.cc
@@ -37,6 +37,7 @@
#include "content/common/set_process_title.h"
#include "content/common/zygote_commands_linux.h"
#include "content/public/common/content_descriptors.h"
+#include "content/public/common/mojo_channel_switches.h"
#include "content/public/common/result_codes.h"
#include "content/public/common/sandbox_linux.h"
#include "content/public/common/send_zygote_child_ping_linux.h"
@@ -430,20 +431,16 @@ int Zygote::ForkWithRealPid(const std::string& process_type,
base::ScopedFD read_pipe, write_pipe;
base::ProcessId pid = 0;
if (helper) {
- int ipc_channel_fd = LookUpFd(fd_mapping, kPrimaryIPCChannel);
- if (ipc_channel_fd < 0) {
- DLOG(ERROR) << "Failed to find kPrimaryIPCChannel in FD mapping";
- return -1;
- }
int mojo_channel_fd = LookUpFd(fd_mapping, kMojoIPCChannel);
if (mojo_channel_fd < 0) {
DLOG(ERROR) << "Failed to find kMojoIPCChannel in FD mapping";
return -1;
}
+ int ipc_channel_fd = LookUpFd(fd_mapping, kPrimaryIPCChannel);
+ DCHECK_EQ(-1, ipc_channel_fd);
std::vector<int> fds;
- fds.push_back(ipc_channel_fd); // kBrowserFDIndex
+ fds.push_back(mojo_channel_fd); // kBrowserFDIndex
fds.push_back(pid_oracle.get()); // kPIDOracleFDIndex
- fds.push_back(mojo_channel_fd); // kMojoParentFDIndex
pid = helper->Fork(process_type, fds, channel_id);
// Helpers should never return in the child process.
@@ -569,7 +566,7 @@ base::ProcessId Zygote::ReadArgsAndFork(base::PickleIterator iter,
std::string process_type;
std::string channel_id;
const std::string channel_id_prefix = std::string("--")
- + switches::kProcessChannelID + std::string("=");
+ + switches::kMojoChannelToken + std::string("=");
if (!iter.ReadString(&process_type))
return -1;
« no previous file with comments | « content/public/common/zygote_fork_delegate_linux.h ('k') | mojo/edk/system/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698