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

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

Issue 1106203002: sandbox/win: Fix warnings found by clang chromium-style plugin on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 | « sandbox/win/src/restricted_token.h ('k') | sandbox/win/src/win2k_threadpool.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/win/src/restricted_token.cc
diff --git a/sandbox/win/src/restricted_token.cc b/sandbox/win/src/restricted_token.cc
index 3960926f4d792829fe3b7fe260335fdc62b549eb..7ebef3de9aefd278df5a012c95c9cc220e3983dd 100644
--- a/sandbox/win/src/restricted_token.cc
+++ b/sandbox/win/src/restricted_token.cc
@@ -10,9 +10,19 @@
#include "sandbox/win/src/acl.h"
#include "sandbox/win/src/win_utils.h"
-
namespace sandbox {
+RestrictedToken::RestrictedToken()
+ : init_(false),
+ effective_token_(NULL),
+ integrity_level_(INTEGRITY_LEVEL_LAST) {
+}
+
+RestrictedToken::~RestrictedToken() {
+ if (effective_token_)
+ CloseHandle(effective_token_);
+}
+
unsigned RestrictedToken::Init(const HANDLE effective_token) {
if (init_)
return ERROR_ALREADY_INITIALIZED;
« no previous file with comments | « sandbox/win/src/restricted_token.h ('k') | sandbox/win/src/win2k_threadpool.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698