| 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/process.h" | 12 #include "base/process/process.h" |
| 13 #include "base/strings/utf_string_conversions.h" | 13 #include "base/strings/utf_string_conversions.h" |
| 14 #include "base/win/windows_version.h" | 14 #include "base/win/windows_version.h" |
| 15 #include "content/public/common/content_switches.h" | 15 #include "content/public/common/content_switches.h" |
| 16 #include "content/public/common/result_codes.h" | 16 #include "content/public/common/result_codes.h" |
| 17 #include "sandbox/win/src/handle_table.h" | 17 #include "sandbox/win/src/handle_table.h" |
| 18 | 18 |
| 19 using base::ASCIIToUTF16; |
| 20 |
| 19 namespace content { | 21 namespace content { |
| 20 namespace { | 22 namespace { |
| 21 | 23 |
| 22 typedef std::map<const base::string16, HandleType> HandleTypeMap; | 24 typedef std::map<const base::string16, HandleType> HandleTypeMap; |
| 23 | 25 |
| 24 HandleTypeMap& MakeHandleTypeMap() { | 26 HandleTypeMap& MakeHandleTypeMap() { |
| 25 HandleTypeMap& handle_types = *(new HandleTypeMap()); | 27 HandleTypeMap& handle_types = *(new HandleTypeMap()); |
| 26 handle_types[sandbox::HandleTable::kTypeProcess] = ProcessHandle; | 28 handle_types[sandbox::HandleTable::kTypeProcess] = ProcessHandle; |
| 27 handle_types[sandbox::HandleTable::kTypeThread] = ThreadHandle; | 29 handle_types[sandbox::HandleTable::kTypeThread] = ThreadHandle; |
| 28 handle_types[sandbox::HandleTable::kTypeFile] = FileHandle; | 30 handle_types[sandbox::HandleTable::kTypeFile] = FileHandle; |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 311 if (access & FILE_MAP_READ) | 313 if (access & FILE_MAP_READ) |
| 312 output.append(ASCIIToUTF16("\tFILE_MAP_READ\n")); | 314 output.append(ASCIIToUTF16("\tFILE_MAP_READ\n")); |
| 313 if (access & FILE_MAP_WRITE) | 315 if (access & FILE_MAP_WRITE) |
| 314 output.append(ASCIIToUTF16("\tFILE_MAP_WRITE\n")); | 316 output.append(ASCIIToUTF16("\tFILE_MAP_WRITE\n")); |
| 315 break; | 317 break; |
| 316 } | 318 } |
| 317 return output; | 319 return output; |
| 318 } | 320 } |
| 319 | 321 |
| 320 } // namespace content | 322 } // namespace content |
| OLD | NEW |