Index: sandbox/win/src/sandbox_policy.h |
diff --git a/sandbox/win/src/sandbox_policy.h b/sandbox/win/src/sandbox_policy.h |
index 12c0b863c885aa55efb9e059b052f85197ba0b97..29ebc785c247b8d5b4490f513893ea91dca8a5e7 100644 |
--- a/sandbox/win/src/sandbox_policy.h |
+++ b/sandbox/win/src/sandbox_policy.h |
@@ -12,6 +12,7 @@ |
#include "base/basictypes.h" |
#include "base/compiler_specific.h" |
+#include "base/memory/ref_counted.h" |
#include "base/strings/string16.h" |
#include "base/win/scoped_handle.h" |
#include "sandbox/win/src/app_container.h" |
@@ -34,7 +35,7 @@ typedef std::vector<base::win::ScopedHandle*> HandleList; |
// A Windows sandbox policy. All public methods are virtual since they may be |
// called from a dll, while the implementation of the methods lives in the main |
// exe. |
-class TargetPolicy { |
+class TargetPolicy : public base::RefCountedThreadSafe<TargetPolicy> { |
public: |
TargetPolicy(); |
@@ -81,16 +82,6 @@ class TargetPolicy { |
// even if the process cannot access that subsystem. |
}; |
- // Increments the reference count of this object. The reference count must |
- // be incremented if this interface is given to another component. |
- virtual void AddRef(); |
- |
- // Decrements the reference count of this object. When the reference count |
- // is zero the object is automatically destroyed. |
- // Indicates that the caller is done with this interface. After calling |
- // release no other method should be called. |
- virtual void Release(); |
- |
// Sets the security level for the target process' two tokens. |
// This setting is permanent and cannot be changed once the target process is |
// spawned. |
@@ -328,8 +319,6 @@ class TargetPolicy { |
// The policy takes ownership of them. |
typedef std::list<TargetProcess*> TargetSet; |
TargetSet targets_; |
- // Standard object-lifetime reference counter. |
- volatile LONG ref_count; |
// The user-defined global policy settings. |
TokenLevel lockdown_level_; |
TokenLevel initial_level_; |