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

Unified Diff: sandbox/win/tools/finder/finder.cc

Issue 1232963002: Sandbox: Make CreateRestrictedToken return a ScopedHandle. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
Index: sandbox/win/tools/finder/finder.cc
diff --git a/sandbox/win/tools/finder/finder.cc b/sandbox/win/tools/finder/finder.cc
index 9b829628e3e691c2f65d4dae3453df580a6cced3..4a3de4ee38a7edf71d0437a0b9089b22b2367424 100644
--- a/sandbox/win/tools/finder/finder.cc
+++ b/sandbox/win/tools/finder/finder.cc
@@ -10,15 +10,12 @@ Finder::Finder() {
file_output_ = NULL;
object_type_ = 0;
access_type_ = 0;
- token_handle_ = NULL;
memset(filesystem_stats_, 0, sizeof(filesystem_stats_));
memset(registry_stats_, 0, sizeof(registry_stats_));
memset(kernel_object_stats_, 0, sizeof(kernel_object_stats_));
}
Finder::~Finder() {
- if (token_handle_)
- ::CloseHandle(token_handle_);
}
DWORD Finder::Init(sandbox::TokenLevel token_type,
@@ -42,7 +39,7 @@ DWORD Finder::Init(sandbox::TokenLevel token_type,
}
DWORD Finder::Scan() {
- if (!token_handle_) {
+ if (!token_handle_.IsValid()) {
return ERROR_NO_TOKEN;
}
« sandbox/win/src/restricted_token_utils.h ('K') | « sandbox/win/tools/finder/finder.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698