OLD | NEW |
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 #include "sandbox/src/restricted_token.h" | 5 #include "sandbox/win/src/restricted_token.h" |
6 #include "sandbox/src/restricted_token_utils.h" | 6 #include "sandbox/win/src/restricted_token_utils.h" |
7 #include "sandbox/tools/finder/finder.h" | 7 #include "sandbox/win/tools/finder/finder.h" |
8 | 8 |
9 DWORD Finder::ParseFileSystem(ATL::CString directory) { | 9 DWORD Finder::ParseFileSystem(ATL::CString directory) { |
10 WIN32_FIND_DATA find_data; | 10 WIN32_FIND_DATA find_data; |
11 HANDLE find; | 11 HANDLE find; |
12 | 12 |
13 //Search for items in the directory. | 13 //Search for items in the directory. |
14 ATL::CString name_to_search = directory + L"\\*"; | 14 ATL::CString name_to_search = directory + L"\\*"; |
15 find = ::FindFirstFile(name_to_search, &find_data); | 15 find = ::FindFirstFile(name_to_search, &find_data); |
16 if (INVALID_HANDLE_VALUE == find) { | 16 if (INVALID_HANDLE_VALUE == find) { |
17 DWORD error = ::GetLastError(); | 17 DWORD error = ::GetLastError(); |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 ::CloseHandle(file); | 108 ::CloseHandle(file); |
109 return GENERIC_READ; | 109 return GENERIC_READ; |
110 } else if (::GetLastError() != ERROR_ACCESS_DENIED) { | 110 } else if (::GetLastError() != ERROR_ACCESS_DENIED) { |
111 Output(FS_ERR, GetLastError(), name); | 111 Output(FS_ERR, GetLastError(), name); |
112 filesystem_stats_[BROKEN]++; | 112 filesystem_stats_[BROKEN]++; |
113 } | 113 } |
114 } | 114 } |
115 | 115 |
116 return 0; | 116 return 0; |
117 } | 117 } |
OLD | NEW |