| 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 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 // which is called from ChromeMain, simply constructs one of these objects and | 23 // which is called from ChromeMain, simply constructs one of these objects and |
| 24 // runs it. | 24 // runs it. |
| 25 class Zygote { | 25 class Zygote { |
| 26 public: | 26 public: |
| 27 Zygote(int sandbox_flags, | 27 Zygote(int sandbox_flags, |
| 28 ZygoteForkDelegate* helper); | 28 ZygoteForkDelegate* helper); |
| 29 ~Zygote(); | 29 ~Zygote(); |
| 30 | 30 |
| 31 bool ProcessRequests(); | 31 bool ProcessRequests(); |
| 32 | 32 |
| 33 static const int kBrowserDescriptor = 3; | |
| 34 static const int kMagicSandboxIPCDescriptor = 5; | |
| 35 | |
| 36 private: | 33 private: |
| 37 struct ZygoteProcessInfo { | 34 struct ZygoteProcessInfo { |
| 38 // Pid from inside the Zygote's PID namespace. | 35 // Pid from inside the Zygote's PID namespace. |
| 39 base::ProcessHandle internal_pid; | 36 base::ProcessHandle internal_pid; |
| 40 // Keeps track of whether or not a process was started from a fork | 37 // Keeps track of whether or not a process was started from a fork |
| 41 // delegate helper. | 38 // delegate helper. |
| 42 bool started_from_helper; | 39 bool started_from_helper; |
| 43 }; | 40 }; |
| 44 typedef base::SmallMap< std::map<base::ProcessHandle, ZygoteProcessInfo> > | 41 typedef base::SmallMap< std::map<base::ProcessHandle, ZygoteProcessInfo> > |
| 45 ZygoteProcessMap; | 42 ZygoteProcessMap; |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 // These might be set by helper_->InitialUMA. They supply a UMA enumeration | 118 // These might be set by helper_->InitialUMA. They supply a UMA enumeration |
| 122 // sample we should report on the first fork. | 119 // sample we should report on the first fork. |
| 123 std::string initial_uma_name_; | 120 std::string initial_uma_name_; |
| 124 int initial_uma_sample_; | 121 int initial_uma_sample_; |
| 125 int initial_uma_boundary_value_; | 122 int initial_uma_boundary_value_; |
| 126 }; | 123 }; |
| 127 | 124 |
| 128 } // namespace content | 125 } // namespace content |
| 129 | 126 |
| 130 #endif // CONTENT_ZYGOTE_ZYGOTE_H_ | 127 #endif // CONTENT_ZYGOTE_ZYGOTE_H_ |
| OLD | NEW |