summaryrefslogtreecommitdiffstats
path: root/sandbox/src/broker_services.h
diff options
context:
space:
mode:
Diffstat (limited to 'sandbox/src/broker_services.h')
-rw-r--r--sandbox/src/broker_services.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/sandbox/src/broker_services.h b/sandbox/src/broker_services.h
index 3e57dd2..8e4cb54 100644
--- a/sandbox/src/broker_services.h
+++ b/sandbox/src/broker_services.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -6,6 +6,7 @@
#define SANDBOX_SRC_BROKER_SERVICES_H__
#include <list>
+#include <set>
#include "base/basictypes.h"
#include "sandbox/src/crosscall_server.h"
#include "sandbox/src/job.h"
@@ -32,7 +33,7 @@ class BrokerServicesBase : public BrokerServices,
~BrokerServicesBase();
- // The next four methods are the BrokerServices interface
+ // The next five methods are the BrokerServices interface
virtual ResultCode Init();
virtual TargetPolicy* CreatePolicy();
@@ -44,6 +45,12 @@ class BrokerServicesBase : public BrokerServices,
virtual ResultCode WaitForAllTargets();
+ // Checks if the supplied process ID matches one of the broker's active
+ // target processes
+ // Returns:
+ // true if there is an active target process for this ID, otherwise false.
+ bool IsActiveTarget(DWORD process_id);
+
private:
// Helper structure that allows the Broker to associate a job notification
// with a job object and with a policy.
@@ -85,6 +92,9 @@ class BrokerServicesBase : public BrokerServices,
typedef std::list<JobTracker*> JobTrackerList;
JobTrackerList tracker_list_;
+ // Provides a fast lookup to identify sandboxed processes.
+ std::set<DWORD> child_process_ids_;
+
DISALLOW_COPY_AND_ASSIGN(BrokerServicesBase);
};