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

Unified Diff: components/nacl/zygote/nacl_fork_delegate_linux.cc

Issue 240673002: Simplify ZygoteForkDelegate API further (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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
Index: components/nacl/zygote/nacl_fork_delegate_linux.cc
diff --git a/components/nacl/zygote/nacl_fork_delegate_linux.cc b/components/nacl/zygote/nacl_fork_delegate_linux.cc
index df5a1ab7add00d68181b4b3a3054607d2f0c41c3..6a95ec0a6f675cfa2275bf3f4e8fd807cc25b4b7 100644
--- a/components/nacl/zygote/nacl_fork_delegate_linux.cc
+++ b/components/nacl/zygote/nacl_fork_delegate_linux.cc
@@ -263,7 +263,8 @@ bool NaClForkDelegate::CanHelp(const std::string& process_type,
}
pid_t NaClForkDelegate::Fork(const std::string& process_type,
- const std::vector<int>& fds) {
+ const std::vector<int>& fds,
+ const std::string& channel_id) {
VLOG(1) << "NaClForkDelegate::Fork";
DCHECK(fds.size() == kNumPassedFDs);
@@ -281,6 +282,7 @@ pid_t NaClForkDelegate::Fork(const std::string& process_type,
const bool uses_nonsfi_mode =
process_type == switches::kNaClLoaderNonSfiProcess;
write_pickle.WriteBool(uses_nonsfi_mode);
+ write_pickle.WriteString(channel_id);
char reply_buf[kNaClMaxIPCMessageLength];
ssize_t reply_size = 0;
@@ -304,15 +306,6 @@ pid_t NaClForkDelegate::Fork(const std::string& process_type,
return nacl_child;
}
-bool NaClForkDelegate::AckChild(const int fd, const std::string& channel_id) {
- ssize_t nwritten =
- HANDLE_EINTR(write(fd, channel_id.c_str(), channel_id.length()));
- if (static_cast<size_t>(nwritten) != channel_id.length()) {
- return false;
- }
- return true;
-}
-
bool NaClForkDelegate::GetTerminationStatus(pid_t pid, bool known_dead,
base::TerminationStatus* status,
int* exit_code) {

Powered by Google App Engine
This is Rietveld 408576698