| 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" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 continue; | 68 continue; |
| 69 | 69 |
| 70 output += ASCIIToUTF16("["); | 70 output += ASCIIToUTF16("["); |
| 71 output += sys_handle->Type(); | 71 output += sys_handle->Type(); |
| 72 output += ASCIIToUTF16("] ("); | 72 output += ASCIIToUTF16("] ("); |
| 73 output += sys_handle->Name(); | 73 output += sys_handle->Name(); |
| 74 output += ASCIIToUTF16(")\n"); | 74 output += ASCIIToUTF16(")\n"); |
| 75 output += GetAccessString(current_type, | 75 output += GetAccessString(current_type, |
| 76 sys_handle->handle_entry()->GrantedAccess); | 76 sys_handle->handle_entry()->GrantedAccess); |
| 77 } | 77 } |
| 78 DLOG(INFO) << output; | 78 DVLOG(0) << output; |
| 79 } | 79 } |
| 80 | 80 |
| 81 HandleType StringToHandleType(const string16& type) { | 81 HandleType StringToHandleType(const string16& type) { |
| 82 static HandleTypeMap handle_types = MakeHandleTypeMap(); | 82 static HandleTypeMap handle_types = MakeHandleTypeMap(); |
| 83 HandleTypeMap::iterator result = handle_types.find(type); | 83 HandleTypeMap::iterator result = handle_types.find(type); |
| 84 return result != handle_types.end() ? result->second : OtherHandle; | 84 return result != handle_types.end() ? result->second : OtherHandle; |
| 85 } | 85 } |
| 86 | 86 |
| 87 string16 GetAccessString(HandleType handle_type, | 87 string16 GetAccessString(HandleType handle_type, |
| 88 ACCESS_MASK access) { | 88 ACCESS_MASK access) { |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 311 if (access & FILE_MAP_READ) | 311 if (access & FILE_MAP_READ) |
| 312 output.append(ASCIIToUTF16("\tFILE_MAP_READ\n")); | 312 output.append(ASCIIToUTF16("\tFILE_MAP_READ\n")); |
| 313 if (access & FILE_MAP_WRITE) | 313 if (access & FILE_MAP_WRITE) |
| 314 output.append(ASCIIToUTF16("\tFILE_MAP_WRITE\n")); | 314 output.append(ASCIIToUTF16("\tFILE_MAP_WRITE\n")); |
| 315 break; | 315 break; |
| 316 } | 316 } |
| 317 return output; | 317 return output; |
| 318 } | 318 } |
| 319 | 319 |
| 320 } // namespace content | 320 } // namespace content |
| OLD | NEW |