Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(274)

Side by Side Diff: sandbox/win/tools/finder/finder_registry.cc

Issue 10783004: Move Windows Sandbox, trybots version (don't commit me!) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to top of tree Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sandbox/win/tools/finder/finder_kernel.cc ('k') | sandbox/win/tools/finder/main.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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::ParseRegistry(HKEY key, ATL::CString print_name) { 9 DWORD Finder::ParseRegistry(HKEY key, ATL::CString print_name) {
10 DWORD index = 0; 10 DWORD index = 0;
11 DWORD name_size = 2048; 11 DWORD name_size = 2048;
12 wchar_t buffer[2048] = {0}; 12 wchar_t buffer[2048] = {0};
13 // TODO(nsylvain): Don't hardcode 2048. Get the key len by calling the 13 // TODO(nsylvain): Don't hardcode 2048. Get the key len by calling the
14 // function. 14 // function.
15 LONG err_code = ::RegEnumKey(key, index, buffer, name_size); 15 LONG err_code = ::RegEnumKey(key, index, buffer, name_size);
16 while (ERROR_SUCCESS == err_code) { 16 while (ERROR_SUCCESS == err_code) {
17 ATL::CString name_complete = print_name + buffer + L"\\"; 17 ATL::CString name_complete = print_name + buffer + L"\\";
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 ::RegCloseKey(key_res); 84 ::RegCloseKey(key_res);
85 return GENERIC_READ; 85 return GENERIC_READ;
86 } else if (err_code != ERROR_ACCESS_DENIED) { 86 } else if (err_code != ERROR_ACCESS_DENIED) {
87 Output(REG_ERR, err_code, print_name); 87 Output(REG_ERR, err_code, print_name);
88 registry_stats_[BROKEN]++; 88 registry_stats_[BROKEN]++;
89 } 89 }
90 } 90 }
91 91
92 return 0; 92 return 0;
93 } 93 }
OLDNEW
« no previous file with comments | « sandbox/win/tools/finder/finder_kernel.cc ('k') | sandbox/win/tools/finder/main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698