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

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

Issue 1378523002: Use scoped_refptr and RefCountedThreadSafe for TargetPolicy. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated patchset dependency Created 5 years, 1 month 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 | « sandbox/win/src/sandbox_policy.h ('k') | sandbox/win/tests/common/controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/win/src/sandbox_policy_base.cc
diff --git a/sandbox/win/src/sandbox_policy_base.cc b/sandbox/win/src/sandbox_policy_base.cc
index 52aa5b40e28482cc726ae076839f5546e9534621..499cdd96748e0b4f7c7e464f25abce78ae98e0bb 100644
--- a/sandbox/win/src/sandbox_policy_base.cc
+++ b/sandbox/win/src/sandbox_policy_base.cc
@@ -112,8 +112,7 @@ IntegrityLevel TargetPolicy::alternate_desktop_integrity_level_label_ =
INTEGRITY_LEVEL_SYSTEM;
TargetPolicy::TargetPolicy()
- : ref_count(1),
- lockdown_level_(USER_LOCKDOWN),
+ : lockdown_level_(USER_LOCKDOWN),
initial_level_(USER_LOCKDOWN),
job_level_(JOB_LOCKDOWN),
ui_exceptions_(0),
@@ -152,15 +151,6 @@ TargetPolicy::~TargetPolicy() {
::DeleteCriticalSection(&lock_);
}
-void TargetPolicy::AddRef() {
- ::InterlockedIncrement(&ref_count);
-}
-
-void TargetPolicy::Release() {
- if (0 == ::InterlockedDecrement(&ref_count))
- delete this;
-}
-
ResultCode TargetPolicy::SetTokenLevel(TokenLevel initial,
TokenLevel lockdown) {
if (initial < lockdown) {
« no previous file with comments | « sandbox/win/src/sandbox_policy.h ('k') | sandbox/win/tests/common/controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698