Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 | 9 |
| 10 #include "base/containers/small_map.h" | 10 #include "base/containers/small_map.h" |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 70 int* exit_code); | 70 int* exit_code); |
| 71 | 71 |
| 72 void HandleGetTerminationStatus(int fd, | 72 void HandleGetTerminationStatus(int fd, |
| 73 const Pickle& pickle, | 73 const Pickle& pickle, |
| 74 PickleIterator iter); | 74 PickleIterator iter); |
| 75 | 75 |
| 76 // This is equivalent to fork(), except that, when using the SUID sandbox, it | 76 // This is equivalent to fork(), except that, when using the SUID sandbox, it |
| 77 // returns the real PID of the child process as it appears outside the | 77 // returns the real PID of the child process as it appears outside the |
| 78 // sandbox, rather than returning the PID inside the sandbox. Optionally, it | 78 // sandbox, rather than returning the PID inside the sandbox. Optionally, it |
| 79 // fills in uma_name et al with a report the helper wants to make via | 79 // fills in uma_name et al with a report the helper wants to make via |
| 80 // UMA_HISTOGRAM_ENUMERATION. | 80 // UMA_HISTOGRAM_ENUMERATION. |
|
jln (very slow on Chromium)
2014/05/05 19:01:42
It's a little unfortunately that this method is so
mdempsky
2014/05/05 21:38:18
Done. Tried to improve the uma_* docs a little bi
| |
| 81 int ForkWithRealPid(const std::string& process_type, | 81 int ForkWithRealPid(const std::string& process_type, |
| 82 const base::GlobalDescriptors::Mapping& fd_mapping, | 82 const base::GlobalDescriptors::Mapping& fd_mapping, |
| 83 const std::string& channel_id, | 83 const std::string& channel_id, |
| 84 base::ScopedFD pid_oracle, | |
| 84 std::string* uma_name, | 85 std::string* uma_name, |
| 85 int* uma_sample, | 86 int* uma_sample, |
| 86 int* uma_boundary_value); | 87 int* uma_boundary_value); |
| 87 | 88 |
| 88 // Unpacks process type and arguments from |pickle| and forks a new process. | 89 // Unpacks process type and arguments from |pickle| and forks a new process. |
| 89 // Returns -1 on error, otherwise returns twice, returning 0 to the child | 90 // Returns -1 on error, otherwise returns twice, returning 0 to the child |
| 90 // process and the child process ID to the parent process, like fork(). | 91 // process and the child process ID to the parent process, like fork(). |
| 91 base::ProcessId ReadArgsAndFork(const Pickle& pickle, | 92 base::ProcessId ReadArgsAndFork(const Pickle& pickle, |
| 92 PickleIterator iter, | 93 PickleIterator iter, |
| 93 ScopedVector<base::ScopedFD> fds, | 94 ScopedVector<base::ScopedFD> fds, |
| (...skipping 26 matching lines...) Expand all Loading... | |
| 120 // These might be set by helper_->InitialUMA. They supply a UMA enumeration | 121 // These might be set by helper_->InitialUMA. They supply a UMA enumeration |
| 121 // sample we should report on the first fork. | 122 // sample we should report on the first fork. |
| 122 std::string initial_uma_name_; | 123 std::string initial_uma_name_; |
| 123 int initial_uma_sample_; | 124 int initial_uma_sample_; |
| 124 int initial_uma_boundary_value_; | 125 int initial_uma_boundary_value_; |
| 125 }; | 126 }; |
| 126 | 127 |
| 127 } // namespace content | 128 } // namespace content |
| 128 | 129 |
| 129 #endif // CONTENT_ZYGOTE_ZYGOTE_H_ | 130 #endif // CONTENT_ZYGOTE_ZYGOTE_H_ |
| OLD | NEW |