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

Side by Side Diff: sandbox/src/sandbox_nt_util.h

Issue 378030: 64-bit compatibility changes for the sandbox code (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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/src/sandbox.cc ('k') | sandbox/src/sandbox_nt_util.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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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_SRC_SANDBOX_NT_UTIL_H_ 5 #ifndef SANDBOX_SRC_SANDBOX_NT_UTIL_H_
6 #define SANDBOX_SRC_SANDBOX_NT_UTIL_H_ 6 #define SANDBOX_SRC_SANDBOX_NT_UTIL_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "sandbox/src/nt_internals.h" 9 #include "sandbox/src/nt_internals.h"
10 #include "sandbox/src/sandbox_nt_types.h" 10 #include "sandbox/src/sandbox_nt_types.h"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 UNICODE_STRING* GetBackingFilePath(PVOID address); 118 UNICODE_STRING* GetBackingFilePath(PVOID address);
119 119
120 // Returns the last component of a path that contains the module name. 120 // Returns the last component of a path that contains the module name.
121 // It will return NULL if the path ends with the path separator. The returned 121 // It will return NULL if the path ends with the path separator. The returned
122 // buffer must be freed with a placement delete (see GetImageNameFromModule 122 // buffer must be freed with a placement delete (see GetImageNameFromModule
123 // example). 123 // example).
124 UNICODE_STRING* ExtractModuleName(const UNICODE_STRING* module_path); 124 UNICODE_STRING* ExtractModuleName(const UNICODE_STRING* module_path);
125 125
126 // Returns true if the parameters correspond to a dll mapped as code. 126 // Returns true if the parameters correspond to a dll mapped as code.
127 bool IsValidImageSection(HANDLE section, PVOID *base, PLARGE_INTEGER offset, 127 bool IsValidImageSection(HANDLE section, PVOID *base, PLARGE_INTEGER offset,
128 PULONG view_size); 128 PSIZE_T view_size);
129 129
130 // Converts an ansi string to an UNICODE_STRING. 130 // Converts an ansi string to an UNICODE_STRING.
131 UNICODE_STRING* AnsiToUnicode(const char* string); 131 UNICODE_STRING* AnsiToUnicode(const char* string);
132 132
133 // Provides a simple way to temporarily change the protection of a memory page. 133 // Provides a simple way to temporarily change the protection of a memory page.
134 class AutoProtectMemory { 134 class AutoProtectMemory {
135 public: 135 public:
136 AutoProtectMemory() 136 AutoProtectMemory()
137 : changed_(false), address_(NULL), bytes_(0), old_protect_(0) {} 137 : changed_(false), address_(NULL), bytes_(0), old_protect_(0) {}
138 138
(...skipping 18 matching lines...) Expand all
157 157
158 // Returns true if the file_rename_information structure is supported by our 158 // Returns true if the file_rename_information structure is supported by our
159 // rename handler. 159 // rename handler.
160 bool IsSupportedRenameCall(FILE_RENAME_INFORMATION* file_info, DWORD length, 160 bool IsSupportedRenameCall(FILE_RENAME_INFORMATION* file_info, DWORD length,
161 uint32 file_info_class); 161 uint32 file_info_class);
162 162
163 } // namespace sandbox 163 } // namespace sandbox
164 164
165 165
166 #endif // SANDBOX_SRC_SANDBOX_NT_UTIL_H__ 166 #endif // SANDBOX_SRC_SANDBOX_NT_UTIL_H__
OLDNEW
« no previous file with comments | « sandbox/src/sandbox.cc ('k') | sandbox/src/sandbox_nt_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698