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

Side by Side Diff: sandbox/win/src/sandbox_policy_base.h

Issue 2950153002: Improve process launch handle sharing API. (Closed)
Patch Set: Fix Created 3 years, 5 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 SANDBOX_WIN_SRC_SANDBOX_POLICY_BASE_H_ 5 #ifndef SANDBOX_WIN_SRC_SANDBOX_POLICY_BASE_H_
6 #define SANDBOX_WIN_SRC_SANDBOX_POLICY_BASE_H_ 6 #define SANDBOX_WIN_SRC_SANDBOX_POLICY_BASE_H_
7 7
8 #include <windows.h> 8 #include <windows.h>
9 #include <stddef.h> 9 #include <stddef.h>
10 #include <stdint.h> 10 #include <stdint.h>
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 // Removes a Job object associated with this policy and the target associated 94 // Removes a Job object associated with this policy and the target associated
95 // with the job. 95 // with the job.
96 bool OnJobEmpty(HANDLE job); 96 bool OnJobEmpty(HANDLE job);
97 97
98 EvalResult EvalPolicy(int service, CountedParameterSetBase* params); 98 EvalResult EvalPolicy(int service, CountedParameterSetBase* params);
99 99
100 HANDLE GetStdoutHandle(); 100 HANDLE GetStdoutHandle();
101 HANDLE GetStderrHandle(); 101 HANDLE GetStderrHandle();
102 102
103 // Returns the list of handles being shared with the target process. 103 // Returns the list of handles being shared with the target process.
104 const base::HandlesToInheritVector& GetHandlesBeingShared(); 104 const std::vector<HANDLE>& GetHandlesBeingShared();
105 105
106 private: 106 private:
107 ~PolicyBase(); 107 ~PolicyBase();
108 108
109 // Sets up interceptions for a new target. 109 // Sets up interceptions for a new target.
110 ResultCode SetupAllInterceptions(TargetProcess* target); 110 ResultCode SetupAllInterceptions(TargetProcess* target);
111 111
112 // Sets up the handle closer for a new target. 112 // Sets up the handle closer for a new target.
113 bool SetupHandleCloser(TargetProcess* target); 113 bool SetupHandleCloser(TargetProcess* target);
114 114
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 std::unique_ptr<Dispatcher> dispatcher_; 158 std::unique_ptr<Dispatcher> dispatcher_;
159 bool lockdown_default_dacl_; 159 bool lockdown_default_dacl_;
160 160
161 static HDESK alternate_desktop_handle_; 161 static HDESK alternate_desktop_handle_;
162 static HWINSTA alternate_winstation_handle_; 162 static HWINSTA alternate_winstation_handle_;
163 static IntegrityLevel alternate_desktop_integrity_level_label_; 163 static IntegrityLevel alternate_desktop_integrity_level_label_;
164 164
165 // Contains the list of handles being shared with the target process. 165 // Contains the list of handles being shared with the target process.
166 // This list contains handles other than the stderr/stdout handles which are 166 // This list contains handles other than the stderr/stdout handles which are
167 // shared with the target at times. 167 // shared with the target at times.
168 base::HandlesToInheritVector handles_to_share_; 168 std::vector<HANDLE> handles_to_share_;
169 bool enable_opm_redirection_; 169 bool enable_opm_redirection_;
170 170
171 DISALLOW_COPY_AND_ASSIGN(PolicyBase); 171 DISALLOW_COPY_AND_ASSIGN(PolicyBase);
172 }; 172 };
173 173
174 } // namespace sandbox 174 } // namespace sandbox
175 175
176 #endif // SANDBOX_WIN_SRC_SANDBOX_POLICY_BASE_H_ 176 #endif // SANDBOX_WIN_SRC_SANDBOX_POLICY_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698