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/src/policy_broker.cc

Issue 84063004: Restructure sandbox code to reduce dependencies pulled in by intercept code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cpu@ comments Created 7 years 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <map> 5 #include <map>
6 6
7 #include "sandbox/win/src/policy_broker.h" 7 #include "sandbox/win/src/policy_broker.h"
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/win/pe_image.h" 10 #include "base/win/pe_image.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 INIT_GLOBAL_RTL(RtlAllocateHeap); 66 INIT_GLOBAL_RTL(RtlAllocateHeap);
67 INIT_GLOBAL_RTL(RtlAnsiStringToUnicodeString); 67 INIT_GLOBAL_RTL(RtlAnsiStringToUnicodeString);
68 INIT_GLOBAL_RTL(RtlCompareUnicodeString); 68 INIT_GLOBAL_RTL(RtlCompareUnicodeString);
69 INIT_GLOBAL_RTL(RtlCreateHeap); 69 INIT_GLOBAL_RTL(RtlCreateHeap);
70 INIT_GLOBAL_RTL(RtlCreateUserThread); 70 INIT_GLOBAL_RTL(RtlCreateUserThread);
71 INIT_GLOBAL_RTL(RtlDestroyHeap); 71 INIT_GLOBAL_RTL(RtlDestroyHeap);
72 INIT_GLOBAL_RTL(RtlFreeHeap); 72 INIT_GLOBAL_RTL(RtlFreeHeap);
73 INIT_GLOBAL_RTL(_strnicmp); 73 INIT_GLOBAL_RTL(_strnicmp);
74 INIT_GLOBAL_RTL(strlen); 74 INIT_GLOBAL_RTL(strlen);
75 INIT_GLOBAL_RTL(wcslen); 75 INIT_GLOBAL_RTL(wcslen);
76 INIT_GLOBAL_RTL(memcpy);
76 77
77 #ifndef NDEBUG 78 #ifndef NDEBUG
78 // Verify that the structure is fully initialized. 79 // Verify that the structure is fully initialized.
79 for (size_t i = 0; i < sizeof(g_nt)/sizeof(void*); i++) 80 for (size_t i = 0; i < sizeof(g_nt)/sizeof(void*); i++)
80 DCHECK(reinterpret_cast<char**>(&g_nt)[i]); 81 DCHECK(reinterpret_cast<char**>(&g_nt)[i]);
81 #endif 82 #endif
82 return (SBOX_ALL_OK == child->TransferVariable("g_nt", &g_nt, sizeof(g_nt))); 83 return (SBOX_ALL_OK == child->TransferVariable("g_nt", &g_nt, sizeof(g_nt)));
83 } 84 }
84 85
85 #undef INIT_GLOBAL_NT 86 #undef INIT_GLOBAL_NT
(...skipping 20 matching lines...) Expand all
106 return false; 107 return false;
107 108
108 return INTERCEPT_NT(manager, NtOpenThreadTokenEx, OPEN_THREAD_TOKEN_EX_ID, 109 return INTERCEPT_NT(manager, NtOpenThreadTokenEx, OPEN_THREAD_TOKEN_EX_ID,
109 24); 110 24);
110 } 111 }
111 112
112 return true; 113 return true;
113 } 114 }
114 115
115 } // namespace sandbox 116 } // namespace sandbox
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698