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

Side by Side Diff: sandbox/src/broker_services.h

Issue 9959018: Use ScopedProcessInformation and other RAII types in sandbox. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_SRC_BROKER_SERVICES_H__ 5 #ifndef SANDBOX_SRC_BROKER_SERVICES_H__
6 #define SANDBOX_SRC_BROKER_SERVICES_H__ 6 #define SANDBOX_SRC_BROKER_SERVICES_H__
7 7
8 #include <list> 8 #include <list>
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "sandbox/src/crosscall_server.h" 10 #include "sandbox/src/crosscall_server.h"
(...skipping 22 matching lines...) Expand all
33 ~BrokerServicesBase(); 33 ~BrokerServicesBase();
34 34
35 // The next four methods are the BrokerServices interface 35 // The next four methods are the BrokerServices interface
36 virtual ResultCode Init(); 36 virtual ResultCode Init();
37 37
38 virtual TargetPolicy* CreatePolicy(); 38 virtual TargetPolicy* CreatePolicy();
39 39
40 virtual ResultCode SpawnTarget(const wchar_t* exe_path, 40 virtual ResultCode SpawnTarget(const wchar_t* exe_path,
41 const wchar_t* command_line, 41 const wchar_t* command_line,
42 TargetPolicy* policy, 42 TargetPolicy* policy,
43 PROCESS_INFORMATION* target); 43 base::win::ScopedProcessInformation* target);
44 44
45 virtual ResultCode WaitForAllTargets(); 45 virtual ResultCode WaitForAllTargets();
46 46
47 private: 47 private:
48 // Helper structure that allows the Broker to associate a job notification 48 // Helper structure that allows the Broker to associate a job notification
49 // with a job object and with a policy. 49 // with a job object and with a policy.
50 struct JobTracker { 50 struct JobTracker {
51 HANDLE job; 51 HANDLE job;
52 PolicyBase* policy; 52 PolicyBase* policy;
53 JobTracker(HANDLE cjob, PolicyBase* cpolicy) 53 JobTracker(HANDLE cjob, PolicyBase* cpolicy)
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 typedef std::list<JobTracker*> JobTrackerList; 85 typedef std::list<JobTracker*> JobTrackerList;
86 JobTrackerList tracker_list_; 86 JobTrackerList tracker_list_;
87 87
88 DISALLOW_COPY_AND_ASSIGN(BrokerServicesBase); 88 DISALLOW_COPY_AND_ASSIGN(BrokerServicesBase);
89 }; 89 };
90 90
91 } // namespace sandbox 91 } // namespace sandbox
92 92
93 93
94 #endif // SANDBOX_SRC_BROKER_SERVICES_H__ 94 #endif // SANDBOX_SRC_BROKER_SERVICES_H__
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698