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

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

Issue 919893002: Replace handles that the handle closer closes with dummy Events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add comment Created 5 years, 10 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
« no previous file with comments | « no previous file | sandbox/win/src/handle_closer_agent.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/win/src/handle_closer_agent.h
diff --git a/sandbox/win/src/handle_closer_agent.h b/sandbox/win/src/handle_closer_agent.h
index 50ebf8959d3448ffa8ca452baef354528e31a0c9..e189c1d7870c12454b25180f72b2e4329943c9d4 100644
--- a/sandbox/win/src/handle_closer_agent.h
+++ b/sandbox/win/src/handle_closer_agent.h
@@ -7,6 +7,7 @@
#include "base/basictypes.h"
#include "base/strings/string16.h"
+#include "base/win/scoped_handle.h"
#include "sandbox/win/src/handle_closer.h"
#include "sandbox/win/src/sandbox_types.h"
@@ -15,7 +16,7 @@ namespace sandbox {
// Target process code to close the handle list copied over from the broker.
class HandleCloserAgent {
public:
- HandleCloserAgent() {}
+ HandleCloserAgent();
// Reads the serialized list from the broker and creates the lookup map.
void InitializeHandlesToClose();
@@ -23,11 +24,16 @@ class HandleCloserAgent {
// Closes any handles matching those in the lookup map.
bool CloseHandles();
- // True if we have handles waiting to be closed
+ // True if we have handles waiting to be closed.
static bool NeedsHandlesClosed();
private:
+ // Attempt to stuff a closed handle with a dummy Event.
+ bool AttemptToStuffHandleSlot(HANDLE closed_handle,
+ const base::string16& type);
+
HandleMap handles_to_close_;
+ base::win::ScopedHandle dummy_handle_;
DISALLOW_COPY_AND_ASSIGN(HandleCloserAgent);
};
« no previous file with comments | « no previous file | sandbox/win/src/handle_closer_agent.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698