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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 continue; | 75 continue; |
76 | 76 |
77 output += ASCIIToUTF16("["); | 77 output += ASCIIToUTF16("["); |
78 output += sys_handle->Type(); | 78 output += sys_handle->Type(); |
79 output += ASCIIToUTF16("] ("); | 79 output += ASCIIToUTF16("] ("); |
80 output += sys_handle->Name(); | 80 output += sys_handle->Name(); |
81 output += ASCIIToUTF16(")\n"); | 81 output += ASCIIToUTF16(")\n"); |
82 output += GetAccessString(current_type, | 82 output += GetAccessString(current_type, |
83 sys_handle->handle_entry()->GrantedAccess); | 83 sys_handle->handle_entry()->GrantedAccess); |
84 } | 84 } |
85 LOG(INFO) << output; | 85 DLOG(INFO) << output; |
86 } | 86 } |
87 | 87 |
88 HandleType StringToHandleType(const string16& type) { | 88 HandleType StringToHandleType(const string16& type) { |
89 static HandleTypeMap handle_types = MakeHandleTypeMap(); | 89 static HandleTypeMap handle_types = MakeHandleTypeMap(); |
90 HandleTypeMap::iterator result = handle_types.find(type); | 90 HandleTypeMap::iterator result = handle_types.find(type); |
91 return result != handle_types.end() ? result->second : OtherHandle; | 91 return result != handle_types.end() ? result->second : OtherHandle; |
92 } | 92 } |
93 | 93 |
94 string16 GetAccessString(HandleType handle_type, | 94 string16 GetAccessString(HandleType handle_type, |
95 ACCESS_MASK access) { | 95 ACCESS_MASK access) { |
(...skipping 224 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 |