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

Unified Diff: sandbox/win/src/sandbox_policy_base.h

Issue 1229163002: Sandbox: Remove raw handles from PolicyBase. (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 side-by-side diff with in-line comments
Download patch
Index: sandbox/win/src/sandbox_policy_base.h
diff --git a/sandbox/win/src/sandbox_policy_base.h b/sandbox/win/src/sandbox_policy_base.h
index 1de5cf8c368cd42ca13df69efe479fdbabc5c405..0024ba8565d9a74d3e4c0f8b3f2529f0dfcbc5c5 100644
--- a/sandbox/win/src/sandbox_policy_base.h
+++ b/sandbox/win/src/sandbox_policy_base.h
@@ -29,7 +29,7 @@ class LowLevelPolicy;
class TargetProcess;
struct PolicyGlobal;
-typedef std::vector<HANDLE> HandleList;
+typedef std::vector<base::win::ScopedHandle*> HandleList;
// We act as a policy dispatcher, implementing the handler for the "ping" IPC,
// so we have to provide the appropriate handler on the OnMessageReady method.
@@ -104,7 +104,7 @@ class PolicyBase : public Dispatcher, public TargetPolicy {
HANDLE GetStderrHandle();
// Returns the list of handles being shared with the target process.
- HandleList GetHandlesBeingShared();
+ const HandleList& GetHandlesBeingShared();
// Closes the handles being shared with the target and clears out the list.
void ClearSharedHandles();
@@ -177,7 +177,7 @@ class PolicyBase : public Dispatcher, public TargetPolicy {
// Contains the list of handles being shared with the target process.
// This list contains handles other than the stderr/stdout handles which are
// shared with the target at times.
- std::vector<HANDLE> handles_to_share_;
+ HandleList handles_to_share_;
DISALLOW_COPY_AND_ASSIGN(PolicyBase);
};

Powered by Google App Engine
This is Rietveld 408576698