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

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

Issue 1231673005: Sandbox: Update the constructor of TargetProcess to receive ScopedHandles. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « sandbox/win/src/broker_services.cc ('k') | sandbox/win/src/target_process.cc » ('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 SANDBOX_WIN_SRC_TARGET_PROCESS_H_ 5 #ifndef SANDBOX_WIN_SRC_TARGET_PROCESS_H_
6 #define SANDBOX_WIN_SRC_TARGET_PROCESS_H_ 6 #define SANDBOX_WIN_SRC_TARGET_PROCESS_H_
7 7
8 #include <windows.h> 8 #include <windows.h>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 15 matching lines...) Expand all
26 26
27 class AttributeList; 27 class AttributeList;
28 class SharedMemIPCServer; 28 class SharedMemIPCServer;
29 class ThreadProvider; 29 class ThreadProvider;
30 30
31 // TargetProcess models a target instance (child process). Objects of this 31 // TargetProcess models a target instance (child process). Objects of this
32 // class are owned by the Policy used to create them. 32 // class are owned by the Policy used to create them.
33 class TargetProcess { 33 class TargetProcess {
34 public: 34 public:
35 // The constructor takes ownership of |initial_token| and |lockdown_token|. 35 // The constructor takes ownership of |initial_token| and |lockdown_token|.
36 TargetProcess(HANDLE initial_token, HANDLE lockdown_token, HANDLE job, 36 TargetProcess(base::win::ScopedHandle initial_token,
37 ThreadProvider* thread_pool); 37 base::win::ScopedHandle lockdown_token,
38 HANDLE job, ThreadProvider* thread_pool);
38 ~TargetProcess(); 39 ~TargetProcess();
39 40
40 // TODO(cpu): Currently there does not seem to be a reason to implement 41 // TODO(cpu): Currently there does not seem to be a reason to implement
41 // reference counting for this class since is internal, but kept the 42 // reference counting for this class since is internal, but kept the
42 // the same interface so the interception framework does not need to be 43 // the same interface so the interception framework does not need to be
43 // touched at this point. 44 // touched at this point.
44 void AddRef() {} 45 void AddRef() {}
45 void Release() {} 46 void Release() {}
46 47
47 // Creates the new target process. The process is created suspended. 48 // Creates the new target process. The process is created suspended.
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 }; 127 };
127 128
128 // Creates a mock TargetProcess used for testing interceptions. 129 // Creates a mock TargetProcess used for testing interceptions.
129 // TODO(cpu): It seems that this method is not going to be used anymore. 130 // TODO(cpu): It seems that this method is not going to be used anymore.
130 TargetProcess* MakeTestTargetProcess(HANDLE process, HMODULE base_address); 131 TargetProcess* MakeTestTargetProcess(HANDLE process, HMODULE base_address);
131 132
132 133
133 } // namespace sandbox 134 } // namespace sandbox
134 135
135 #endif // SANDBOX_WIN_SRC_TARGET_PROCESS_H_ 136 #endif // SANDBOX_WIN_SRC_TARGET_PROCESS_H_
OLDNEW
« no previous file with comments | « sandbox/win/src/broker_services.cc ('k') | sandbox/win/src/target_process.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698