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

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

Issue 1752233002: Convert Pass()→std::move() on Windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 9 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
« no previous file with comments | « sandbox/win/src/job.cc ('k') | sandbox/win/src/target_process.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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 18 matching lines...) Expand all
29 } 29 }
30 30
31 scoped_ptr<BYTE[]> buffer(new BYTE[size]); 31 scoped_ptr<BYTE[]> buffer(new BYTE[size]);
32 if (!::GetTokenInformation(token.Get(), info_class, buffer.get(), size, 32 if (!::GetTokenInformation(token.Get(), info_class, buffer.get(), size,
33 &size)) { 33 &size)) {
34 *error = ::GetLastError(); 34 *error = ::GetLastError();
35 return nullptr; 35 return nullptr;
36 } 36 }
37 37
38 *error = ERROR_SUCCESS; 38 *error = ERROR_SUCCESS;
39 return buffer.Pass(); 39 return buffer;
40 } 40 }
41 41
42 } // namespace 42 } // namespace
43 43
44 namespace sandbox { 44 namespace sandbox {
45 45
46 RestrictedToken::RestrictedToken() 46 RestrictedToken::RestrictedToken()
47 : integrity_level_(INTEGRITY_LEVEL_LAST), 47 : integrity_level_(INTEGRITY_LEVEL_LAST),
48 init_(false) { 48 init_(false) {
49 } 49 }
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 416
417 return ERROR_SUCCESS; 417 return ERROR_SUCCESS;
418 } 418 }
419 419
420 DWORD RestrictedToken::SetIntegrityLevel(IntegrityLevel integrity_level) { 420 DWORD RestrictedToken::SetIntegrityLevel(IntegrityLevel integrity_level) {
421 integrity_level_ = integrity_level; 421 integrity_level_ = integrity_level;
422 return ERROR_SUCCESS; 422 return ERROR_SUCCESS;
423 } 423 }
424 424
425 } // namespace sandbox 425 } // namespace sandbox
OLDNEW
« no previous file with comments | « sandbox/win/src/job.cc ('k') | sandbox/win/src/target_process.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698