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

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

Issue 2825853002: Improvements to uses of base::SmallMap (Closed)
Patch Set: Created 3 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 unified diff | Download patch
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_LINUX_H_ 5 #ifndef CONTENT_ZYGOTE_ZYGOTE_LINUX_H_
6 #define CONTENT_ZYGOTE_ZYGOTE_LINUX_H_ 6 #define CONTENT_ZYGOTE_ZYGOTE_LINUX_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 struct ZygoteProcessInfo { 44 struct ZygoteProcessInfo {
45 // Pid from inside the Zygote's PID namespace. 45 // Pid from inside the Zygote's PID namespace.
46 base::ProcessHandle internal_pid; 46 base::ProcessHandle internal_pid;
47 // Keeps track of which fork delegate helper the process was started from. 47 // Keeps track of which fork delegate helper the process was started from.
48 ZygoteForkDelegate* started_from_helper; 48 ZygoteForkDelegate* started_from_helper;
49 // Records when the browser requested the zygote to reap this process. 49 // Records when the browser requested the zygote to reap this process.
50 base::TimeTicks time_of_reap_request; 50 base::TimeTicks time_of_reap_request;
51 // Notes whether the zygote has sent SIGKILL to this process. 51 // Notes whether the zygote has sent SIGKILL to this process.
52 bool sent_sigkill; 52 bool sent_sigkill;
53 }; 53 };
54 typedef base::SmallMap< std::map<base::ProcessHandle, ZygoteProcessInfo> > 54 typedef base::small_map<std::map<base::ProcessHandle, ZygoteProcessInfo>>
danakj 2017/04/18 21:35:50 change "typedef" to "using" while you're here?
55 ZygoteProcessMap; 55 ZygoteProcessMap;
56 56
57 // Retrieve a ZygoteProcessInfo from the process_info_map_. 57 // Retrieve a ZygoteProcessInfo from the process_info_map_.
58 // Returns true and write to process_info if |pid| can be found, return 58 // Returns true and write to process_info if |pid| can be found, return
59 // false otherwise. 59 // false otherwise.
60 bool GetProcessInfo(base::ProcessHandle pid, 60 bool GetProcessInfo(base::ProcessHandle pid,
61 ZygoteProcessInfo* process_info); 61 ZygoteProcessInfo* process_info);
62 62
63 // Returns true if the SUID sandbox is active. 63 // Returns true if the SUID sandbox is active.
64 bool UsingSUIDSandbox() const; 64 bool UsingSUIDSandbox() const;
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 // children. 152 // children.
153 std::vector<int> extra_fds_; 153 std::vector<int> extra_fds_;
154 154
155 // The vector contains the child processes that need to be reaped. 155 // The vector contains the child processes that need to be reaped.
156 std::vector<ZygoteProcessInfo> to_reap_; 156 std::vector<ZygoteProcessInfo> to_reap_;
157 }; 157 };
158 158
159 } // namespace content 159 } // namespace content
160 160
161 #endif // CONTENT_ZYGOTE_ZYGOTE_LINUX_H_ 161 #endif // CONTENT_ZYGOTE_ZYGOTE_LINUX_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698