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

Side by Side Diff: content/browser/zygote_host/zygote_host_impl_linux.h

Issue 286903021: Make SandboxIPCProcess a thread. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Close FDs in ::~SandboxIPCHandler(). Created 6 years, 7 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
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_BROWSER_ZYGOTE_HOST_ZYGOTE_HOST_IMPL_LINUX_H_ 5 #ifndef CONTENT_BROWSER_ZYGOTE_HOST_ZYGOTE_HOST_IMPL_LINUX_H_
6 #define CONTENT_BROWSER_ZYGOTE_HOST_ZYGOTE_HOST_IMPL_LINUX_H_ 6 #define CONTENT_BROWSER_ZYGOTE_HOST_ZYGOTE_HOST_IMPL_LINUX_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 // still running, even when they're not. When |known_dead| is true, the 48 // still running, even when they're not. When |known_dead| is true, the
49 // process will be SIGKILL-ed first (which should have no effect if it was 49 // process will be SIGKILL-ed first (which should have no effect if it was
50 // really dead). This is to prevent a waiting waitpid() from blocking in 50 // really dead). This is to prevent a waiting waitpid() from blocking in
51 // a single-threaded Zygote. See crbug.com/157458. 51 // a single-threaded Zygote. See crbug.com/157458.
52 base::TerminationStatus GetTerminationStatus(base::ProcessHandle handle, 52 base::TerminationStatus GetTerminationStatus(base::ProcessHandle handle,
53 bool known_dead, 53 bool known_dead,
54 int* exit_code); 54 int* exit_code);
55 55
56 // ZygoteHost implementation: 56 // ZygoteHost implementation:
57 virtual pid_t GetPid() const OVERRIDE; 57 virtual pid_t GetPid() const OVERRIDE;
58 virtual pid_t GetSandboxHelperPid() const OVERRIDE;
59 virtual int GetSandboxStatus() const OVERRIDE; 58 virtual int GetSandboxStatus() const OVERRIDE;
60 virtual void AdjustRendererOOMScore(base::ProcessHandle process_handle, 59 virtual void AdjustRendererOOMScore(base::ProcessHandle process_handle,
61 int score) OVERRIDE; 60 int score) OVERRIDE;
62 61
63 private: 62 private:
64 friend struct DefaultSingletonTraits<ZygoteHostImpl>; 63 friend struct DefaultSingletonTraits<ZygoteHostImpl>;
65 64
66 ZygoteHostImpl(); 65 ZygoteHostImpl();
67 virtual ~ZygoteHostImpl(); 66 virtual ~ZygoteHostImpl();
68 67
(...skipping 28 matching lines...) Expand all
97 // A lock protecting list_of_running_zygote_children_ and 96 // A lock protecting list_of_running_zygote_children_ and
98 // should_teardown_after_last_child_exits_. 97 // should_teardown_after_last_child_exits_.
99 base::Lock child_tracking_lock_; 98 base::Lock child_tracking_lock_;
100 std::set<pid_t> list_of_running_zygote_children_; 99 std::set<pid_t> list_of_running_zygote_children_;
101 bool should_teardown_after_last_child_exits_; 100 bool should_teardown_after_last_child_exits_;
102 }; 101 };
103 102
104 } // namespace content 103 } // namespace content
105 104
106 #endif // CONTENT_BROWSER_ZYGOTE_HOST_ZYGOTE_HOST_IMPL_LINUX_H_ 105 #endif // CONTENT_BROWSER_ZYGOTE_HOST_ZYGOTE_HOST_IMPL_LINUX_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/sandbox_ipc_linux.cc ('k') | content/browser/zygote_host/zygote_host_impl_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698