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

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

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_utils.cc ('k') | sandbox/win/src/sandbox_utils.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 #ifndef SANDBOX_WIN_SRC_SANDBOX_POLICY_H_ 5 #ifndef SANDBOX_WIN_SRC_SANDBOX_POLICY_H_
6 #define SANDBOX_WIN_SRC_SANDBOX_POLICY_H_ 6 #define SANDBOX_WIN_SRC_SANDBOX_POLICY_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/strings/string16.h"
11 #include "sandbox/win/src/sandbox_types.h" 12 #include "sandbox/win/src/sandbox_types.h"
12 #include "sandbox/win/src/security_level.h" 13 #include "sandbox/win/src/security_level.h"
13 14
14 namespace sandbox { 15 namespace sandbox {
15 16
16 class TargetPolicy { 17 class TargetPolicy {
17 public: 18 public:
18 // Windows subsystems that can have specific rules. 19 // Windows subsystems that can have specific rules.
19 // Note: The process subsystem(SUBSY_PROCESS) does not evaluate the request 20 // Note: The process subsystem(SUBSY_PROCESS) does not evaluate the request
20 // exactly like the CreateProcess API does. See the comment at the top of 21 // exactly like the CreateProcess API does. See the comment at the top of
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 virtual ResultCode SetJobLevel(JobLevel job_level, uint32 ui_exceptions) = 0; 123 virtual ResultCode SetJobLevel(JobLevel job_level, uint32 ui_exceptions) = 0;
123 124
124 // Specifies the desktop on which the application is going to run. If the 125 // Specifies the desktop on which the application is going to run. If the
125 // desktop does not exist, it will be created. If alternate_winstation is 126 // desktop does not exist, it will be created. If alternate_winstation is
126 // set to true, the desktop will be created on an alternate window station. 127 // set to true, the desktop will be created on an alternate window station.
127 virtual ResultCode SetAlternateDesktop(bool alternate_winstation) = 0; 128 virtual ResultCode SetAlternateDesktop(bool alternate_winstation) = 0;
128 129
129 // Returns the name of the alternate desktop used. If an alternate window 130 // Returns the name of the alternate desktop used. If an alternate window
130 // station is specified, the name is prepended by the window station name, 131 // station is specified, the name is prepended by the window station name,
131 // followed by a backslash. 132 // followed by a backslash.
132 virtual std::wstring GetAlternateDesktop() const = 0; 133 virtual base::string16 GetAlternateDesktop() const = 0;
133 134
134 // Precreates the desktop and window station, if any. 135 // Precreates the desktop and window station, if any.
135 virtual ResultCode CreateAlternateDesktop(bool alternate_winstation) = 0; 136 virtual ResultCode CreateAlternateDesktop(bool alternate_winstation) = 0;
136 137
137 // Destroys the desktop and windows station. 138 // Destroys the desktop and windows station.
138 virtual void DestroyAlternateDesktop() = 0; 139 virtual void DestroyAlternateDesktop() = 0;
139 140
140 // Sets the integrity level of the process in the sandbox. Both the initial 141 // Sets the integrity level of the process in the sandbox. Both the initial
141 // token and the main token will be affected by this. If the integrity level 142 // token and the main token will be affected by this. If the integrity level
142 // is set to a level higher than the current level, the sandbox will fail 143 // is set to a level higher than the current level, the sandbox will fail
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 // A NULL value for handle_name indicates all handles of the specified type. 219 // A NULL value for handle_name indicates all handles of the specified type.
219 // An empty string for handle_name indicates the handle is unnamed. 220 // An empty string for handle_name indicates the handle is unnamed.
220 virtual ResultCode AddKernelObjectToClose(const wchar_t* handle_type, 221 virtual ResultCode AddKernelObjectToClose(const wchar_t* handle_type,
221 const wchar_t* handle_name) = 0; 222 const wchar_t* handle_name) = 0;
222 }; 223 };
223 224
224 } // namespace sandbox 225 } // namespace sandbox
225 226
226 227
227 #endif // SANDBOX_WIN_SRC_SANDBOX_POLICY_H_ 228 #endif // SANDBOX_WIN_SRC_SANDBOX_POLICY_H_
OLDNEW
« no previous file with comments | « sandbox/win/src/restricted_token_utils.cc ('k') | sandbox/win/src/sandbox_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698