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

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

Issue 1232963002: Sandbox: Make CreateRestrictedToken return a ScopedHandle. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix remoting Created 5 years, 5 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_unittest.cc ('k') | sandbox/win/src/restricted_token_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/win/src/restricted_token_utils.h
diff --git a/sandbox/win/src/restricted_token_utils.h b/sandbox/win/src/restricted_token_utils.h
index 509feaf74bdf5cf14507fdc581531d79bf8b826b..40d228694cb24098f0746f56a9dc64408f43ebbb 100644
--- a/sandbox/win/src/restricted_token_utils.h
+++ b/sandbox/win/src/restricted_token_utils.h
@@ -8,6 +8,7 @@
#include <accctrl.h>
#include <windows.h>
+#include "base/win/scoped_handle.h"
#include "sandbox/win/src/restricted_token.h"
#include "sandbox/win/src/security_level.h"
@@ -27,15 +28,15 @@ enum TokenType {
// restricted. The token_type determines if the token will be used as a primary
// token or impersonation token. The integrity level of the token is set to
// |integrity level| on Vista only.
-// token_handle is the output value containing the handle of the
-// newly created restricted token.
+// |token| is the output value containing the handle of the newly created
+// restricted token.
// If the function succeeds, the return value is ERROR_SUCCESS. If the
// function fails, the return value is the win32 error code corresponding to
// the error.
-DWORD CreateRestrictedToken(HANDLE *token_handle,
- TokenLevel security_level,
+DWORD CreateRestrictedToken(TokenLevel security_level,
IntegrityLevel integrity_level,
- TokenType token_type);
+ TokenType token_type,
+ base::win::ScopedHandle* token);
// Starts the process described by the input parameter command_line in a job
// with a restricted token. Also set the main thread of this newly created
« no previous file with comments | « sandbox/win/src/restricted_token_unittest.cc ('k') | sandbox/win/src/restricted_token_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698