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

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

Issue 1538283002: Switch to standard integer types in sandbox/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: macros Created 4 years, 12 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/sandbox_policy_base.h ('k') | sandbox/win/src/sandbox_rand.h » ('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/sandbox_policy_base.h" 5 #include "sandbox/win/src/sandbox_policy_base.h"
6 6
7 #include <sddl.h> 7 #include <sddl.h>
8 #include <stddef.h>
9 #include <stdint.h>
8 10
9 #include "base/basictypes.h"
10 #include "base/callback.h" 11 #include "base/callback.h"
11 #include "base/logging.h" 12 #include "base/logging.h"
12 #include "base/macros.h" 13 #include "base/macros.h"
13 #include "base/stl_util.h" 14 #include "base/stl_util.h"
14 #include "base/strings/stringprintf.h" 15 #include "base/strings/stringprintf.h"
15 #include "base/win/windows_version.h" 16 #include "base/win/windows_version.h"
16 #include "sandbox/win/src/app_container.h" 17 #include "sandbox/win/src/app_container.h"
17 #include "sandbox/win/src/filesystem_policy.h" 18 #include "sandbox/win/src/filesystem_policy.h"
18 #include "sandbox/win/src/handle_policy.h" 19 #include "sandbox/win/src/handle_policy.h"
19 #include "sandbox/win/src/interception.h" 20 #include "sandbox/win/src/interception.h"
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 } 176 }
176 177
177 TokenLevel PolicyBase::GetInitialTokenLevel() const { 178 TokenLevel PolicyBase::GetInitialTokenLevel() const {
178 return initial_level_; 179 return initial_level_;
179 } 180 }
180 181
181 TokenLevel PolicyBase::GetLockdownTokenLevel() const{ 182 TokenLevel PolicyBase::GetLockdownTokenLevel() const{
182 return lockdown_level_; 183 return lockdown_level_;
183 } 184 }
184 185
185 ResultCode PolicyBase::SetJobLevel(JobLevel job_level, uint32 ui_exceptions) { 186 ResultCode PolicyBase::SetJobLevel(JobLevel job_level, uint32_t ui_exceptions) {
186 if (memory_limit_ && job_level == JOB_NONE) { 187 if (memory_limit_ && job_level == JOB_NONE) {
187 return SBOX_ERROR_BAD_PARAMS; 188 return SBOX_ERROR_BAD_PARAMS;
188 } 189 }
189 job_level_ = job_level; 190 job_level_ = job_level;
190 ui_exceptions_ = ui_exceptions; 191 ui_exceptions_ = ui_exceptions;
191 return SBOX_ALL_OK; 192 return SBOX_ALL_OK;
192 } 193 }
193 194
194 ResultCode PolicyBase::SetJobMemoryLimit(size_t memory_limit) { 195 ResultCode PolicyBase::SetJobMemoryLimit(size_t memory_limit) {
195 if (memory_limit && job_level_ == JOB_NONE) { 196 if (memory_limit && job_level_ == JOB_NONE) {
(...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after
760 break; 761 break;
761 } 762 }
762 763
763 default: { return SBOX_ERROR_UNSUPPORTED; } 764 default: { return SBOX_ERROR_UNSUPPORTED; }
764 } 765 }
765 766
766 return SBOX_ALL_OK; 767 return SBOX_ALL_OK;
767 } 768 }
768 769
769 } // namespace sandbox 770 } // namespace sandbox
OLDNEW
« no previous file with comments | « sandbox/win/src/sandbox_policy_base.h ('k') | sandbox/win/src/sandbox_rand.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698