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

Side by Side Diff: sandbox/win/src/restricted_token.cc

Issue 1210013007: clang/win: Fix warnings to prepare for building without -Wno-reorder. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@clang-unsequenced
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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "sandbox/win/src/restricted_token.h" 5 #include "sandbox/win/src/restricted_token.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "sandbox/win/src/acl.h" 10 #include "sandbox/win/src/acl.h"
11 #include "sandbox/win/src/win_utils.h" 11 #include "sandbox/win/src/win_utils.h"
12 12
13 namespace sandbox { 13 namespace sandbox {
14 14
15 RestrictedToken::RestrictedToken() 15 RestrictedToken::RestrictedToken()
16 : init_(false), 16 : effective_token_(NULL),
17 effective_token_(NULL), 17 integrity_level_(INTEGRITY_LEVEL_LAST),
18 integrity_level_(INTEGRITY_LEVEL_LAST) { 18 init_(false) {
19 } 19 }
20 20
21 RestrictedToken::~RestrictedToken() { 21 RestrictedToken::~RestrictedToken() {
22 if (effective_token_) 22 if (effective_token_)
23 CloseHandle(effective_token_); 23 CloseHandle(effective_token_);
24 } 24 }
25 25
26 unsigned RestrictedToken::Init(const HANDLE effective_token) { 26 unsigned RestrictedToken::Init(const HANDLE effective_token) {
27 if (init_) 27 if (init_)
28 return ERROR_ALREADY_INITIALIZED; 28 return ERROR_ALREADY_INITIALIZED;
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 472
473 return ERROR_SUCCESS; 473 return ERROR_SUCCESS;
474 } 474 }
475 475
476 unsigned RestrictedToken::SetIntegrityLevel(IntegrityLevel integrity_level) { 476 unsigned RestrictedToken::SetIntegrityLevel(IntegrityLevel integrity_level) {
477 integrity_level_ = integrity_level; 477 integrity_level_ = integrity_level;
478 return ERROR_SUCCESS; 478 return ERROR_SUCCESS;
479 } 479 }
480 480
481 } // namespace sandbox 481 } // namespace sandbox
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698