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

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

Issue 23956010: Define magic descriptors in one place. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 3 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
« no previous file with comments | « content/common/zygote_commands_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
(...skipping 12 matching lines...) Expand all
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
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_
OLDNEW
« no previous file with comments | « content/common/zygote_commands_linux.h ('k') | content/zygote/zygote_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698