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

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

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