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

Side by Side Diff: sandbox/win/src/win_utils.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/src/win_utils.h ('k') | sandbox/win/src/win_utils_unittest.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) 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 "sandbox/src/win_utils.h" 5 #include "sandbox/win/src/win_utils.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "sandbox/src/internal_types.h" 11 #include "sandbox/win/src/internal_types.h"
12 #include "sandbox/src/nt_internals.h" 12 #include "sandbox/win/src/nt_internals.h"
13 13
14 namespace { 14 namespace {
15 15
16 // Holds the information about a known registry key. 16 // Holds the information about a known registry key.
17 struct KnownReservedKey { 17 struct KnownReservedKey {
18 const wchar_t* name; 18 const wchar_t* name;
19 HKEY key; 19 HKEY key;
20 }; 20 };
21 21
22 // Contains all the known registry key by name and by handle. 22 // Contains all the known registry key by name and by handle.
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 314
315 for (int tries = 1; !(*function_ptr) && tries < max_tries; ++tries) { 315 for (int tries = 1; !(*function_ptr) && tries < max_tries; ++tries) {
316 if (tries >= sleep_threshold) 316 if (tries >= sleep_threshold)
317 ::Sleep(1); 317 ::Sleep(1);
318 ntdll = ::GetModuleHandle(sandbox::kNtdllName); 318 ntdll = ::GetModuleHandle(sandbox::kNtdllName);
319 *function_ptr = ::GetProcAddress(ntdll, name); 319 *function_ptr = ::GetProcAddress(ntdll, name);
320 } 320 }
321 321
322 CHECK(*function_ptr); 322 CHECK(*function_ptr);
323 } 323 }
OLDNEW
« no previous file with comments | « sandbox/win/src/win_utils.h ('k') | sandbox/win/src/win_utils_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698