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

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

Issue 109843003: Replace wstring with string16 in sandbox (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 | Annotate | Revision Log
« no previous file with comments | « sandbox/win/src/restricted_token.h ('k') | sandbox/win/src/restricted_token_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 270
271 Sid user = reinterpret_cast<SID*>(token_user->User.Sid); 271 Sid user = reinterpret_cast<SID*>(token_user->User.Sid);
272 sids_for_deny_only_.push_back(user); 272 sids_for_deny_only_.push_back(user);
273 273
274 delete[] reinterpret_cast<BYTE*>(token_user); 274 delete[] reinterpret_cast<BYTE*>(token_user);
275 275
276 return ERROR_SUCCESS; 276 return ERROR_SUCCESS;
277 } 277 }
278 278
279 unsigned RestrictedToken::DeleteAllPrivileges( 279 unsigned RestrictedToken::DeleteAllPrivileges(
280 const std::vector<std::wstring> *exceptions) { 280 const std::vector<base::string16> *exceptions) {
281 DCHECK(init_); 281 DCHECK(init_);
282 if (!init_) 282 if (!init_)
283 return ERROR_NO_TOKEN; 283 return ERROR_NO_TOKEN;
284 284
285 // Get the list of privileges in the token 285 // Get the list of privileges in the token
286 TOKEN_PRIVILEGES *token_privileges = NULL; 286 TOKEN_PRIVILEGES *token_privileges = NULL;
287 DWORD size = 0; 287 DWORD size = 0;
288 288
289 BOOL result = ::GetTokenInformation(effective_token_, 289 BOOL result = ::GetTokenInformation(effective_token_,
290 TokenPrivileges, 290 TokenPrivileges,
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 463
464 return ERROR_SUCCESS; 464 return ERROR_SUCCESS;
465 } 465 }
466 466
467 unsigned RestrictedToken::SetIntegrityLevel(IntegrityLevel integrity_level) { 467 unsigned RestrictedToken::SetIntegrityLevel(IntegrityLevel integrity_level) {
468 integrity_level_ = integrity_level; 468 integrity_level_ = integrity_level;
469 return ERROR_SUCCESS; 469 return ERROR_SUCCESS;
470 } 470 }
471 471
472 } // namespace sandbox 472 } // namespace sandbox
OLDNEW
« no previous file with comments | « sandbox/win/src/restricted_token.h ('k') | sandbox/win/src/restricted_token_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698