OLD | NEW |
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 #include "content/common/handle_enumerator_win.h" | 5 #include "content/common/handle_enumerator_win.h" |
6 | 6 |
7 #include <windows.h> | 7 #include <windows.h> |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "base/process.h" | 12 #include "base/process.h" |
13 #include "base/process_util.h" | 13 #include "base/process_util.h" |
14 #include "base/utf_string_conversions.h" | 14 #include "base/utf_string_conversions.h" |
15 #include "base/win/windows_version.h" | 15 #include "base/win/windows_version.h" |
16 #include "content/public/common/content_switches.h" | 16 #include "content/public/common/content_switches.h" |
17 #include "content/public/common/result_codes.h" | 17 #include "content/public/common/result_codes.h" |
18 #include "sandbox/src/handle_table.h" | 18 #include "sandbox/win/src/handle_table.h" |
19 | 19 |
20 namespace { | 20 namespace { |
21 | 21 |
22 typedef std::map<const string16, content::HandleType> HandleTypeMap; | 22 typedef std::map<const string16, content::HandleType> HandleTypeMap; |
23 | 23 |
24 HandleTypeMap& MakeHandleTypeMap() { | 24 HandleTypeMap& MakeHandleTypeMap() { |
25 HandleTypeMap& handle_types = *(new HandleTypeMap()); | 25 HandleTypeMap& handle_types = *(new HandleTypeMap()); |
26 handle_types[sandbox::HandleTable::kTypeProcess] = content::ProcessHandle; | 26 handle_types[sandbox::HandleTable::kTypeProcess] = content::ProcessHandle; |
27 handle_types[sandbox::HandleTable::kTypeThread] = content::ThreadHandle; | 27 handle_types[sandbox::HandleTable::kTypeThread] = content::ThreadHandle; |
28 handle_types[sandbox::HandleTable::kTypeFile] = content::FileHandle; | 28 handle_types[sandbox::HandleTable::kTypeFile] = content::FileHandle; |
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
320 if (access & FILE_MAP_READ) | 320 if (access & FILE_MAP_READ) |
321 output.append(ASCIIToUTF16("\tFILE_MAP_READ\n")); | 321 output.append(ASCIIToUTF16("\tFILE_MAP_READ\n")); |
322 if (access & FILE_MAP_WRITE) | 322 if (access & FILE_MAP_WRITE) |
323 output.append(ASCIIToUTF16("\tFILE_MAP_WRITE\n")); | 323 output.append(ASCIIToUTF16("\tFILE_MAP_WRITE\n")); |
324 break; | 324 break; |
325 } | 325 } |
326 return output; | 326 return output; |
327 } | 327 } |
328 | 328 |
329 } // namespace content | 329 } // namespace content |
OLD | NEW |