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

Side by Side Diff: content/public/common/zygote_fork_delegate_linux.h

Issue 269413004: Add support for multiple zygote fork delegates (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: IWYU 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
« no previous file with comments | « content/public/app/content_main_delegate.cc ('k') | content/zygote/zygote_linux.h » ('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_PUBLIC_COMMON_ZYGOTE_FORK_DELEGATE_LINUX_H_ 5 #ifndef CONTENT_PUBLIC_COMMON_ZYGOTE_FORK_DELEGATE_LINUX_H_
6 #define CONTENT_PUBLIC_COMMON_ZYGOTE_FORK_DELEGATE_LINUX_H_ 6 #define CONTENT_PUBLIC_COMMON_ZYGOTE_FORK_DELEGATE_LINUX_H_
7 7
8 #include <unistd.h> 8 #include <unistd.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 15 matching lines...) Expand all
26 // alternative to forking the zygote. A new delegate is passed in 26 // alternative to forking the zygote. A new delegate is passed in
27 // as an argument to ZygoteMain(). 27 // as an argument to ZygoteMain().
28 virtual ~ZygoteForkDelegate() {} 28 virtual ~ZygoteForkDelegate() {}
29 29
30 // Initialization happens in the zygote after it has been 30 // Initialization happens in the zygote after it has been
31 // started by ZygoteMain. 31 // started by ZygoteMain.
32 // If |enable_layer1_sandbox| is true, the delegate must enable a 32 // If |enable_layer1_sandbox| is true, the delegate must enable a
33 // layer-1 sandbox such as the setuid sandbox. 33 // layer-1 sandbox such as the setuid sandbox.
34 virtual void Init(int sandboxdesc, bool enable_layer1_sandbox) = 0; 34 virtual void Init(int sandboxdesc, bool enable_layer1_sandbox) = 0;
35 35
36 // After Init, supply a UMA_HISTOGRAM_ENUMERATION the delegate 36 // After Init, supply a UMA_HISTOGRAM_ENUMERATION the delegate would like
37 // would like to supply on the first fork. 37 // reported to the browser process. (Note: Because these reports are
38 // piggy-backed onto fork responses that don't otherwise contain UMA reports,
39 // this method may not be called until much later.)
38 virtual void InitialUMA(std::string* uma_name, 40 virtual void InitialUMA(std::string* uma_name,
39 int* uma_sample, 41 int* uma_sample,
40 int* uma_boundary_value) = 0; 42 int* uma_boundary_value) = 0;
41 43
42 // Returns 'true' if the delegate would like to handle a given fork 44 // Returns 'true' if the delegate would like to handle a given fork
43 // request. Otherwise returns false. Optionally, fills in uma_name et al 45 // request. Otherwise returns false. Optionally, fills in uma_name et al
44 // with a report the helper wants to make via UMA_HISTOGRAM_ENUMERATION. 46 // with a report the helper wants to make via UMA_HISTOGRAM_ENUMERATION.
45 virtual bool CanHelp(const std::string& process_type, std::string* uma_name, 47 virtual bool CanHelp(const std::string& process_type, std::string* uma_name,
46 int* uma_sample, int* uma_boundary_value) = 0; 48 int* uma_sample, int* uma_boundary_value) = 0;
47 49
(...skipping 27 matching lines...) Expand all
75 // blocking wait() should be performed. In this case, GetTerminationStatus() 77 // blocking wait() should be performed. In this case, GetTerminationStatus()
76 // will send a SIGKILL to the target process first. 78 // will send a SIGKILL to the target process first.
77 virtual bool GetTerminationStatus(pid_t pid, bool known_dead, 79 virtual bool GetTerminationStatus(pid_t pid, bool known_dead,
78 base::TerminationStatus* status, 80 base::TerminationStatus* status,
79 int* exit_code) = 0; 81 int* exit_code) = 0;
80 }; 82 };
81 83
82 } // namespace content 84 } // namespace content
83 85
84 #endif // CONTENT_PUBLIC_COMMON_ZYGOTE_FORK_DELEGATE_LINUX_H_ 86 #endif // CONTENT_PUBLIC_COMMON_ZYGOTE_FORK_DELEGATE_LINUX_H_
OLDNEW
« no previous file with comments | « content/public/app/content_main_delegate.cc ('k') | content/zygote/zygote_linux.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698