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

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

Issue 1538283002: Switch to standard integer types in sandbox/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: macros 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.h ('k') | sandbox/win/src/sandbox_policy_base.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef SANDBOX_WIN_SRC_SANDBOX_POLICY_BASE_H_ 5 #ifndef SANDBOX_WIN_SRC_SANDBOX_POLICY_BASE_H_
6 #define SANDBOX_WIN_SRC_SANDBOX_POLICY_BASE_H_ 6 #define SANDBOX_WIN_SRC_SANDBOX_POLICY_BASE_H_
7 7
8 #include <windows.h> 8 #include <windows.h>
9 #include <stddef.h>
10 #include <stdint.h>
9 11
10 #include <list> 12 #include <list>
11 #include <vector> 13 #include <vector>
12 14
13 #include "base/basictypes.h"
14 #include "base/compiler_specific.h" 15 #include "base/compiler_specific.h"
16 #include "base/macros.h"
15 #include "base/memory/scoped_ptr.h" 17 #include "base/memory/scoped_ptr.h"
16 #include "base/strings/string16.h" 18 #include "base/strings/string16.h"
17 #include "base/win/scoped_handle.h" 19 #include "base/win/scoped_handle.h"
18 #include "sandbox/win/src/crosscall_server.h" 20 #include "sandbox/win/src/crosscall_server.h"
19 #include "sandbox/win/src/handle_closer.h" 21 #include "sandbox/win/src/handle_closer.h"
20 #include "sandbox/win/src/ipc_tags.h" 22 #include "sandbox/win/src/ipc_tags.h"
21 #include "sandbox/win/src/policy_engine_opcodes.h" 23 #include "sandbox/win/src/policy_engine_opcodes.h"
22 #include "sandbox/win/src/policy_engine_params.h" 24 #include "sandbox/win/src/policy_engine_params.h"
23 #include "sandbox/win/src/sandbox_policy.h" 25 #include "sandbox/win/src/sandbox_policy.h"
24 #include "sandbox/win/src/win_utils.h" 26 #include "sandbox/win/src/win_utils.h"
(...skipping 10 matching lines...) Expand all
35 class PolicyBase final : public TargetPolicy { 37 class PolicyBase final : public TargetPolicy {
36 public: 38 public:
37 PolicyBase(); 39 PolicyBase();
38 40
39 // TargetPolicy: 41 // TargetPolicy:
40 void AddRef() override; 42 void AddRef() override;
41 void Release() override; 43 void Release() override;
42 ResultCode SetTokenLevel(TokenLevel initial, TokenLevel lockdown) override; 44 ResultCode SetTokenLevel(TokenLevel initial, TokenLevel lockdown) override;
43 TokenLevel GetInitialTokenLevel() const override; 45 TokenLevel GetInitialTokenLevel() const override;
44 TokenLevel GetLockdownTokenLevel() const override; 46 TokenLevel GetLockdownTokenLevel() const override;
45 ResultCode SetJobLevel(JobLevel job_level, uint32 ui_exceptions) override; 47 ResultCode SetJobLevel(JobLevel job_level, uint32_t ui_exceptions) override;
46 ResultCode SetJobMemoryLimit(size_t memory_limit) override; 48 ResultCode SetJobMemoryLimit(size_t memory_limit) override;
47 ResultCode SetAlternateDesktop(bool alternate_winstation) override; 49 ResultCode SetAlternateDesktop(bool alternate_winstation) override;
48 base::string16 GetAlternateDesktop() const override; 50 base::string16 GetAlternateDesktop() const override;
49 ResultCode CreateAlternateDesktop(bool alternate_winstation) override; 51 ResultCode CreateAlternateDesktop(bool alternate_winstation) override;
50 void DestroyAlternateDesktop() override; 52 void DestroyAlternateDesktop() override;
51 ResultCode SetIntegrityLevel(IntegrityLevel integrity_level) override; 53 ResultCode SetIntegrityLevel(IntegrityLevel integrity_level) override;
52 IntegrityLevel GetIntegrityLevel() const override; 54 IntegrityLevel GetIntegrityLevel() const override;
53 ResultCode SetDelayedIntegrityLevel(IntegrityLevel integrity_level) override; 55 ResultCode SetDelayedIntegrityLevel(IntegrityLevel integrity_level) override;
54 ResultCode SetAppContainer(const wchar_t* sid) override; 56 ResultCode SetAppContainer(const wchar_t* sid) override;
55 ResultCode SetCapability(const wchar_t* sid) override; 57 ResultCode SetCapability(const wchar_t* sid) override;
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 // Maintains the list of target process associated with this policy. 124 // Maintains the list of target process associated with this policy.
123 // The policy takes ownership of them. 125 // The policy takes ownership of them.
124 typedef std::list<TargetProcess*> TargetSet; 126 typedef std::list<TargetProcess*> TargetSet;
125 TargetSet targets_; 127 TargetSet targets_;
126 // Standard object-lifetime reference counter. 128 // Standard object-lifetime reference counter.
127 volatile LONG ref_count; 129 volatile LONG ref_count;
128 // The user-defined global policy settings. 130 // The user-defined global policy settings.
129 TokenLevel lockdown_level_; 131 TokenLevel lockdown_level_;
130 TokenLevel initial_level_; 132 TokenLevel initial_level_;
131 JobLevel job_level_; 133 JobLevel job_level_;
132 uint32 ui_exceptions_; 134 uint32_t ui_exceptions_;
133 size_t memory_limit_; 135 size_t memory_limit_;
134 bool use_alternate_desktop_; 136 bool use_alternate_desktop_;
135 bool use_alternate_winstation_; 137 bool use_alternate_winstation_;
136 // Helps the file system policy initialization. 138 // Helps the file system policy initialization.
137 bool file_system_init_; 139 bool file_system_init_;
138 bool relaxed_interceptions_; 140 bool relaxed_interceptions_;
139 HANDLE stdout_handle_; 141 HANDLE stdout_handle_;
140 HANDLE stderr_handle_; 142 HANDLE stderr_handle_;
141 IntegrityLevel integrity_level_; 143 IntegrityLevel integrity_level_;
142 IntegrityLevel delayed_integrity_level_; 144 IntegrityLevel delayed_integrity_level_;
(...skipping 23 matching lines...) Expand all
166 // This list contains handles other than the stderr/stdout handles which are 168 // This list contains handles other than the stderr/stdout handles which are
167 // shared with the target at times. 169 // shared with the target at times.
168 HandleList handles_to_share_; 170 HandleList handles_to_share_;
169 171
170 DISALLOW_COPY_AND_ASSIGN(PolicyBase); 172 DISALLOW_COPY_AND_ASSIGN(PolicyBase);
171 }; 173 };
172 174
173 } // namespace sandbox 175 } // namespace sandbox
174 176
175 #endif // SANDBOX_WIN_SRC_SANDBOX_POLICY_BASE_H_ 177 #endif // SANDBOX_WIN_SRC_SANDBOX_POLICY_BASE_H_
OLDNEW
« no previous file with comments | « sandbox/win/src/sandbox_policy.h ('k') | sandbox/win/src/sandbox_policy_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698