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

Side by Side Diff: content/zygote/zygote_linux.h

Issue 24449002: NaCl: Clean up how FDs are passed to nacl_helper instances on Linux (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review - cleanup Created 7 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/public/common/zygote_fork_delegate_linux.h ('k') | content/zygote/zygote_linux.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_ZYGOTE_ZYGOTE_H_ 5 #ifndef CONTENT_ZYGOTE_ZYGOTE_H_
6 #define CONTENT_ZYGOTE_ZYGOTE_H_ 6 #define CONTENT_ZYGOTE_ZYGOTE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/containers/small_map.h" 11 #include "base/containers/small_map.h"
12 #include "base/posix/global_descriptors.h"
12 #include "base/process/kill.h" 13 #include "base/process/kill.h"
13 #include "base/process/process.h" 14 #include "base/process/process.h"
14 15
15 class Pickle; 16 class Pickle;
16 class PickleIterator; 17 class PickleIterator;
17 18
18 namespace content { 19 namespace content {
19 20
20 class ZygoteForkDelegate; 21 class ZygoteForkDelegate;
21 22
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 void HandleGetTerminationStatus(int fd, 71 void HandleGetTerminationStatus(int fd,
71 const Pickle& pickle, 72 const Pickle& pickle,
72 PickleIterator iter); 73 PickleIterator iter);
73 74
74 // This is equivalent to fork(), except that, when using the SUID sandbox, it 75 // This is equivalent to fork(), except that, when using the SUID sandbox, it
75 // returns the real PID of the child process as it appears outside the 76 // returns the real PID of the child process as it appears outside the
76 // sandbox, rather than returning the PID inside the sandbox. Optionally, it 77 // sandbox, rather than returning the PID inside the sandbox. Optionally, it
77 // fills in uma_name et al with a report the helper wants to make via 78 // fills in uma_name et al with a report the helper wants to make via
78 // UMA_HISTOGRAM_ENUMERATION. 79 // UMA_HISTOGRAM_ENUMERATION.
79 int ForkWithRealPid(const std::string& process_type, 80 int ForkWithRealPid(const std::string& process_type,
80 std::vector<int>& fds, 81 const base::GlobalDescriptors::Mapping& fd_mapping,
81 const std::string& channel_switch, 82 const std::string& channel_switch,
82 std::string* uma_name, 83 std::string* uma_name,
83 int* uma_sample, 84 int* uma_sample,
84 int* uma_boundary_value); 85 int* uma_boundary_value);
85 86
86 // Unpacks process type and arguments from |pickle| and forks a new process. 87 // Unpacks process type and arguments from |pickle| and forks a new process.
87 // Returns -1 on error, otherwise returns twice, returning 0 to the child 88 // Returns -1 on error, otherwise returns twice, returning 0 to the child
88 // process and the child process ID to the parent process, like fork(). 89 // process and the child process ID to the parent process, like fork().
89 base::ProcessId ReadArgsAndFork(const Pickle& pickle, 90 base::ProcessId ReadArgsAndFork(const Pickle& pickle,
90 PickleIterator iter, 91 PickleIterator iter,
(...skipping 27 matching lines...) Expand all
118 // These might be set by helper_->InitialUMA. They supply a UMA enumeration 119 // These might be set by helper_->InitialUMA. They supply a UMA enumeration
119 // sample we should report on the first fork. 120 // sample we should report on the first fork.
120 std::string initial_uma_name_; 121 std::string initial_uma_name_;
121 int initial_uma_sample_; 122 int initial_uma_sample_;
122 int initial_uma_boundary_value_; 123 int initial_uma_boundary_value_;
123 }; 124 };
124 125
125 } // namespace content 126 } // namespace content
126 127
127 #endif // CONTENT_ZYGOTE_ZYGOTE_H_ 128 #endif // CONTENT_ZYGOTE_ZYGOTE_H_
OLDNEW
« no previous file with comments | « content/public/common/zygote_fork_delegate_linux.h ('k') | content/zygote/zygote_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698